Changeset dc747e3 in mainline for generic/src/cpu/cpu.c


Ignore:
Timestamp:
2005-12-15T10:27:59Z (19 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/cpu/cpu.c

    r3fc03fd rdc747e3  
    6767                        cpus[i].id = i;
    6868                       
     69                        spinlock_initialize(&cpus[i].lock, "cpu_t.lock");
     70
    6971                        #ifdef CONFIG_SMP
    7072                        waitq_initialize(&cpus[i].kcpulb_wq);
     
    7274                       
    7375                        for (j = 0; j < RQ_COUNT; j++) {
     76                                spinlock_initialize(&cpus[i].rq[j].lock, "rq_t.lock");
    7477                                list_initialize(&cpus[i].rq[j].rq_head);
    7578                        }
Note: See TracChangeset for help on using the changeset viewer.