Changeset dc747e3 in mainline for generic/src
- Timestamp:
- 2005-12-15T10:27:59Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7dd2561
- Parents:
- 3fc03fd
- Location:
- generic/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/console/kconsole.c
r3fc03fd rdc747e3 66 66 */ 67 67 68 spinlock_t cmd_lock; /**< Lock protecting command list. */69 link_t cmd_head; /**< Command list. */68 SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ 69 link_t cmd_head; /**< Command list. */ 70 70 71 71 static cmd_info_t *parse_cmdline(char *cmdline, size_t len); … … 78 78 int i; 79 79 80 spinlock_initialize(&cmd_lock, "kconsole_cmd");81 80 list_initialize(&cmd_head); 82 81 -
generic/src/cpu/cpu.c
r3fc03fd rdc747e3 67 67 cpus[i].id = i; 68 68 69 spinlock_initialize(&cpus[i].lock, "cpu_t.lock"); 70 69 71 #ifdef CONFIG_SMP 70 72 waitq_initialize(&cpus[i].kcpulb_wq); … … 72 74 73 75 for (j = 0; j < RQ_COUNT; j++) { 76 spinlock_initialize(&cpus[i].rq[j].lock, "rq_t.lock"); 74 77 list_initialize(&cpus[i].rq[j].rq_head); 75 78 } -
generic/src/debug/print.c
r3fc03fd rdc747e3 36 36 #include <arch.h> 37 37 38 static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */39 static spinlock_t printflock;/**< printf spinlock */38 static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */ 39 SPINLOCK_INITIALIZE(printflock); /**< printf spinlock */ 40 40 41 41 #define DEFAULT_DOUBLE_PRECISION 16 -
generic/src/interrupt/interrupt.c
r3fc03fd rdc747e3 41 41 } exc_table[IVT_ITEMS]; 42 42 43 static spinlock_t exctbl_lock;43 SPINLOCK_INITIALIZE(exctbl_lock); 44 44 45 45 /** Register exception handler … … 125 125 int i; 126 126 127 spinlock_initialize(&exctbl_lock, "exctbl_lock");128 129 127 for (i=0;i < IVT_ITEMS; i++) 130 128 exc_register(i, "undef", exc_undef); -
generic/src/main/main.c
r3fc03fd rdc747e3 175 175 */ 176 176 kconsole_init(); 177 177 178 /* Exception handler initialization, before architecture 178 179 * starts adding it's own handlers -
generic/src/mm/frame.c
r3fc03fd rdc747e3 42 42 #include <align.h> 43 43 44 spinlock_t zone_head_lock;/**< this lock protects zone_head list */45 link_t zone_head; /**< list of all zones in the system */44 SPINLOCK_INITIALIZE(zone_head_lock); /**< this lock protects zone_head list */ 45 link_t zone_head; /**< list of all zones in the system */ 46 46 47 47 /** Blacklist containing non-available areas of memory. … … 243 243 void zone_init(void) 244 244 { 245 spinlock_initialize(&zone_head_lock, "zone_head_lock");246 245 list_initialize(&zone_head); 247 246 } -
generic/src/mm/heap.c
r3fc03fd rdc747e3 44 44 45 45 static chunk_t *chunk0; 46 static spinlock_t heaplock;46 SPINLOCK_INITIALIZE(heaplock); 47 47 48 48 void early_heap_init(__address heap, size_t size) 49 49 { 50 spinlock_initialize(&heaplock, "heap_lock");51 50 memsetb(heap, size, 0); 52 51 chunk0 = (chunk_t *) heap; -
generic/src/mm/tlb.c
r3fc03fd rdc747e3 38 38 #include <panic.h> 39 39 40 #ifdef CONFIG_SMP 41 static spinlock_t tlblock; 42 #endif 40 SPINLOCK_INITIALIZE(tlblock); 43 41 44 42 void tlb_init(void) 45 43 { 46 if (config.cpu_active == 1)47 spinlock_initialize(&tlblock, "tlb_lock");48 49 44 tlb_arch_init(); 50 45 } -
generic/src/proc/task.c
r3fc03fd rdc747e3 37 37 #include <list.h> 38 38 39 spinlock_t tasks_lock;39 SPINLOCK_INITIALIZE(tasks_lock); 40 40 link_t tasks_head; 41 41 … … 49 49 { 50 50 TASK = NULL; 51 spinlock_initialize(&tasks_lock, "tasks_lock");52 51 list_initialize(&tasks_head); 53 52 } -
generic/src/proc/thread.c
r3fc03fd rdc747e3 55 55 char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */ 56 56 57 spinlock_t threads_lock; /**< Lock protecting threads_head list. For locking rules, see declaration thereof. */58 link_t threads_head; /**< List of all threads. */59 60 static spinlock_t tidlock;57 SPINLOCK_INITIALIZE(threads_lock); /**< Lock protecting threads_head list. For locking rules, see declaration thereof. */ 58 link_t threads_head; /**< List of all threads. */ 59 60 SPINLOCK_INITIALIZE(tidlock); 61 61 __u32 last_tid = 0; 62 62 … … 97 97 THREAD = NULL; 98 98 nrdy = 0; 99 spinlock_initialize(&threads_lock, "threads_lock");100 99 list_initialize(&threads_head); 101 100 } -
generic/src/synch/rwlock.c
r3fc03fd rdc747e3 193 193 * after this thread is put asleep. 194 194 */ 195 #ifdef CONFIG_SMP 195 196 thread_register_call_me(release_spinlock, &rwl->lock); 197 #else 198 thread_register_call_me(release_spinlock, NULL); 199 #endif 196 200 197 201 rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock); … … 201 205 * release_spinlock() wasn't called 202 206 */ 203 thread_register_call_me(NULL, NULL); 207 thread_register_call_me(NULL, NULL); 204 208 spinlock_unlock(&rwl->lock); 205 209 case ESYNCH_TIMEOUT:
Note:
See TracChangeset
for help on using the changeset viewer.