Changeset 7c5320c in mainline
- Timestamp:
- 2023-02-07T16:03:05Z (22 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1eaead4
- Parents:
- 5110d0a
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-07 15:59:26)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-07 16:03:05)
- Location:
- kernel
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/smp.c
r5110d0a r7c5320c 178 178 * supposed to wake us up. 179 179 */ 180 if (waitq_sleep_timeout(&ap_completion_wq, 1000000, 181 SYNCH_FLAGS_NONE, NULL) == ETIMEOUT) { 180 if (semaphore_down_timeout(&ap_completion_semaphore, 1000000) != EOK) { 182 181 log(LF_ARCH, LVL_NOTE, "%s: waiting for cpu%u " 183 182 "(APIC ID = %d) timed out", __FUNCTION__, -
kernel/arch/sparc64/src/smp/sun4u/smp.c
r5110d0a r7c5320c 106 106 waking_up_mid = mid; 107 107 108 if (waitq_sleep_timeout(&ap_completion_wq, 1000000, 109 SYNCH_FLAGS_NONE, NULL) == ETIMEOUT) 108 if (semaphore_down_timeout(&ap_completion_semaphore, 1000000) != EOK) 110 109 log(LF_ARCH, LVL_NOTE, "%s: waiting for processor (mid = %" PRIu32 111 110 ") timed out", __func__, mid); -
kernel/arch/sparc64/src/smp/sun4v/smp.c
r5110d0a r7c5320c 373 373 #endif 374 374 375 if (waitq_sleep_timeout(&ap_completion_wq, 10000000, 376 SYNCH_FLAGS_NONE, NULL) == ETIMEOUT) 375 if (semaphore_down_timeout(&ap_completion_semaphore, 10000000) != EOK) 377 376 printf("%s: waiting for processor (cpuid = %" PRIu64 ") timed out\n", 378 377 __func__, cpuid); -
kernel/generic/include/console/chardev.h
r5110d0a r7c5320c 39 39 #include <stdbool.h> 40 40 #include <stddef.h> 41 #include <synch/ waitq.h>41 #include <synch/semaphore.h> 42 42 #include <synch/spinlock.h> 43 43 … … 64 64 typedef struct indev { 65 65 const char *name; 66 waitq_t wq;66 semaphore_t wq; 67 67 68 68 /** Protects everything below. */ -
kernel/generic/include/smp/smp.h
r5110d0a r7c5320c 36 36 #define KERN_SMP_H_ 37 37 38 #include <synch/ waitq.h>38 #include <synch/semaphore.h> 39 39 40 extern waitq_t ap_completion_wq;40 extern semaphore_t ap_completion_semaphore; 41 41 42 42 #ifdef CONFIG_SMP -
kernel/generic/src/console/chardev.c
r5110d0a r7c5320c 52 52 { 53 53 indev->name = name; 54 waitq_initialize(&indev->wq);54 semaphore_initialize(&indev->wq, 0); 55 55 irq_spinlock_initialize(&indev->lock, "chardev.indev.lock"); 56 56 indev->counter = 0; … … 81 81 /* Index modulo size of buffer */ 82 82 indev->index = indev->index % INDEV_BUFLEN; 83 waitq_wakeup(&indev->wq, WAKEUP_FIRST);83 semaphore_up(&indev->wq); 84 84 irq_spinlock_unlock(&indev->lock, true); 85 85 } … … 115 115 } 116 116 117 waitq_sleep(&indev->wq);117 semaphore_down(&indev->wq); 118 118 irq_spinlock_lock(&indev->lock, true); 119 119 char32_t ch = indev->buffer[(indev->index - indev->counter) % -
kernel/generic/src/main/kinit.c
r5110d0a r7c5320c 111 111 #ifdef CONFIG_SMP 112 112 if (config.cpu_count > 1) { 113 waitq_initialize(&ap_completion_wq);113 semaphore_initialize(&ap_completion_semaphore, 0); 114 114 115 115 /* -
kernel/generic/src/main/main.c
r5110d0a r7c5320c 383 383 timeout_init(); 384 384 385 waitq_wakeup(&ap_completion_wq, WAKEUP_FIRST);385 semaphore_up(&ap_completion_semaphore); 386 386 scheduler(); 387 387 /* not reached */ -
kernel/generic/src/smp/smp.c
r5110d0a r7c5320c 39 39 #ifdef CONFIG_SMP 40 40 41 waitq_t ap_completion_wq;41 semaphore_t ap_completion_semaphore; 42 42 43 43 #endif /* CONFIG_SMP */
Note:
See TracChangeset
for help on using the changeset viewer.