Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/system/kernel/smp.cpp
- ===================================================================
- --- src/system/kernel/smp.cpp (revision 42484)
- +++ src/system/kernel/smp.cpp (working copy)
- @@ -1266,14 +1266,15 @@
- void
- call_all_cpus(void (*func)(void*, int), void* cookie)
- {
- + cpu_status state = disable_interrupts();
- +
- // if inter-CPU communication is not yet enabled, use the early mechanism
- if (!sICIEnabled) {
- call_all_cpus_early(func, cookie);
- + restore_interrupts(state);
- return;
- }
- - cpu_status state = disable_interrupts();
- -
- if (smp_get_num_cpus() > 1) {
- smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
- 0, 0, (void*)func, SMP_MSG_FLAG_ASYNC);
- @@ -1289,14 +1290,15 @@
- void
- call_all_cpus_sync(void (*func)(void*, int), void* cookie)
- {
- + cpu_status state = disable_interrupts();
- +
- // if inter-CPU communication is not yet enabled, use the early mechanism
- if (!sICIEnabled) {
- call_all_cpus_early(func, cookie);
- + restore_interrupts(state);
- return;
- }
- - cpu_status state = disable_interrupts();
- -
- if (smp_get_num_cpus() > 1) {
- smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
- 0, 0, (void*)func, SMP_MSG_FLAG_SYNC);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement