Changeset dc747e3 in mainline for generic/src/console/kconsole.c


Ignore:
Timestamp:
2005-12-15T10:27:59Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dd2561
Parents:
3fc03fd
Message:

Add SPINLOCK_DECLARE and SPINLOCK_INITIALIZE macros.
SPINLOCK_DECLARE is to be used instead of direct spinlock_t declarations
in dynamically allocated structures on which spinlock_initialize() is called after
their creation.
SPINLOCK_INITIALIZE is to be used instead of direct spinlock_t declarations
of global spinlocks. It declares and initializes the spinlock.
Moreover, both macros are empty on UP so that -Wall warnings about unused structures
get supressed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/kconsole.c

    r3fc03fd rdc747e3  
    6666 */
    6767 
    68 spinlock_t cmd_lock;    /**< Lock protecting command list. */
    69 link_t cmd_head;        /**< Command list. */
     68SPINLOCK_INITIALIZE(cmd_lock);  /**< Lock protecting command list. */
     69link_t cmd_head;                /**< Command list. */
    7070
    7171static cmd_info_t *parse_cmdline(char *cmdline, size_t len);
     
    7878        int i;
    7979
    80         spinlock_initialize(&cmd_lock, "kconsole_cmd");
    8180        list_initialize(&cmd_head);
    8281
Note: See TracChangeset for help on using the changeset viewer.