Changeset dc747e3 in mainline for generic/include/proc


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.

Location:
generic/include/proc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic/include/proc/scheduler.h

    r3fc03fd rdc747e3  
    4141/** Scheduler run queue structure. */
    4242struct runq {
    43         spinlock_t lock;
     43        SPINLOCK_DECLARE(lock);
    4444        link_t rq_head;         /**< List of ready threads. */
    4545        count_t n;              /**< Number of threads in rq_ready. */
  • generic/include/proc/task.h

    r3fc03fd rdc747e3  
    3535
    3636struct task {
    37         spinlock_t lock;
     37        SPINLOCK_DECLARE(lock);
    3838        link_t th_head;         /**< List of threads contained in this task. */
    3939        link_t tasks_link;      /**< Link to other tasks within the system. */
  • generic/include/proc/thread.h

    r3fc03fd rdc747e3  
    7171         *
    7272         */
    73         spinlock_t lock;
     73        SPINLOCK_DECLARE(lock);
    7474
    7575        void (* thread_code)(void *);           /**< Function implementing the thread. */
Note: See TracChangeset for help on using the changeset viewer.