Changeset 25969ac in mainline
- Timestamp:
- 2012-11-17T00:00:28Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 089c23d
- Parents:
- 853d613
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/smp/smp_call.c
r853d613 r25969ac 69 69 * directly. 70 70 * 71 * All memory accesses of prior to smp_call() will be visible 72 * to @a func on cpu @a cpu_id. Similarly, any changes @a func 73 * makes on cpu @a cpu_id will be visible on this cpu once 74 * smp_call() returns. 75 * 76 * Invoking @a func on the destination cpu acts as a memory barrier 77 * on that cpu. 78 * 71 79 * @param cpu_id Destination CPU's logical id (eg CPU->id) 72 80 * @param func Function to call. … … 89 97 * @a func to complete. 90 98 * 91 * @a call_info must be valid until @a func returns. 99 * @a call_info must be valid until/after @a func returns. Use 100 * smp_call_wait() to wait until it is safe to free @a call_info. 92 101 * 93 102 * If @a cpu_id is the local CPU, the function will be invoked 94 103 * directly. If the destination cpu id @a cpu_id is invalid 95 104 * or denotes an inactive cpu, the call is discarded immediately. 105 * 106 * All memory accesses of the caller prior to smp_call_async() 107 * will be made visible to @a func on the other cpu. Similarly, 108 * any changes @a func makes on cpu @a cpu_id will be visible 109 * to this cpu when smp_call_wait() returns. 110 * 111 * Invoking @a func on the destination cpu acts as a memory barrier 112 * on that cpu. 96 113 * 97 114 * Interrupts must be enabled. Otherwise you run the risk … … 196 213 list_initialize(&calls_list); 197 214 215 /* 216 * Acts as a load memory barrier. Any changes made by the cpu that 217 * added the smp_call to calls_list will be made visible to this cpu. 218 */ 198 219 spinlock_lock(&CPU->smp_calls_lock); 199 220 list_concat(&calls_list, &CPU->smp_pending_calls);
Note:
See TracChangeset
for help on using the changeset viewer.