diff options
author | John Grossman <johngro@users.noreply.github.com> | 2016-09-07 15:29:56 -0700 |
---|---|---|
committer | Travis Geiselbrecht <geist@foobox.com> | 2016-09-07 15:29:56 -0700 |
commit | 0c782aa3817265fa7174029d56ffe2701ba4bb7a (patch) | |
tree | 7d0128ac7c9a4455b265fb9a32f8e341cae8045f | |
parent | 71792d0d250a6f6d5878af4cddcce7fba341c963 (diff) | |
download | common-0c782aa3817265fa7174029d56ffe2701ba4bb7a.tar.gz |
[spelling] signalling --> signaling (#162)
Switch from the UK spelling of signalling (also, signalled and
signaller) to the American spelling.
-rw-r--r-- | app/tests/thread_tests.c | 16 | ||||
-rw-r--r-- | include/kernel/event.h | 4 | ||||
-rw-r--r-- | kernel/event.c | 26 | ||||
-rw-r--r-- | lib/cbuf/include/lib/cbuf.h | 2 | ||||
-rw-r--r-- | platform/cc13xx/radio.c | 8 |
5 files changed, 28 insertions, 28 deletions
diff --git a/app/tests/thread_tests.c b/app/tests/thread_tests.c index aebd58ee..802aa442 100644 --- a/app/tests/thread_tests.c +++ b/app/tests/thread_tests.c @@ -242,15 +242,15 @@ int mutex_test(void) static event_t e; -static int event_signaller(void *arg) +static int event_signaler(void *arg) { - printf("event signaller pausing\n"); + printf("event signaler pausing\n"); thread_sleep(1000); // for (;;) { - printf("signalling event\n"); + printf("signaling event\n"); event_signal(&e, true); - printf("done signalling event\n"); + printf("done signaling event\n"); thread_yield(); // } @@ -287,9 +287,9 @@ void event_test(void) printf("event tests starting\n"); - /* make sure signalling the event wakes up all the threads */ + /* make sure signaling the event wakes up all the threads */ event_init(&e, false, 0); - threads[0] = thread_create("event signaller", &event_signaller, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); + threads[0] = thread_create("event signaler", &event_signaler, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[1] = thread_create("event waiter 0", &event_waiter, (void *)2, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[2] = thread_create("event waiter 1", &event_waiter, (void *)2, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[3] = thread_create("event waiter 2", &event_waiter, (void *)2, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); @@ -305,9 +305,9 @@ void event_test(void) for (uint i = 0; i < countof(threads); i++) thread_join(threads[i], NULL, INFINITE_TIME); - /* make sure signalling the event wakes up precisely one thread */ + /* make sure signaling the event wakes up precisely one thread */ event_init(&e, false, EVENT_FLAG_AUTOUNSIGNAL); - threads[0] = thread_create("event signaller", &event_signaller, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); + threads[0] = thread_create("event signaler", &event_signaler, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[1] = thread_create("event waiter 0", &event_waiter, (void *)99, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[2] = thread_create("event waiter 1", &event_waiter, (void *)99, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); threads[3] = thread_create("event waiter 2", &event_waiter, (void *)99, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE); diff --git a/include/kernel/event.h b/include/kernel/event.h index c1af8636..7da5c157 100644 --- a/include/kernel/event.h +++ b/include/kernel/event.h @@ -34,7 +34,7 @@ __BEGIN_CDECLS; typedef struct event { int magic; - bool signalled; + bool signaled; uint flags; wait_queue_t wait; } event_t; @@ -44,7 +44,7 @@ typedef struct event { #define EVENT_INITIAL_VALUE(e, initial, _flags) \ { \ .magic = EVENT_MAGIC, \ - .signalled = initial, \ + .signaled = initial, \ .flags = _flags, \ .wait = WAIT_QUEUE_INITIAL_VALUE((e).wait), \ } diff --git a/kernel/event.c b/kernel/event.c index 8c331afd..593e7548 100644 --- a/kernel/event.c +++ b/kernel/event.c @@ -74,7 +74,7 @@ void event_destroy(event_t *e) THREAD_LOCK(state); e->magic = 0; - e->signalled = false; + e->signaled = false; e->flags = 0; wait_queue_destroy(&e->wait, true); @@ -104,14 +104,14 @@ status_t event_wait_timeout(event_t *e, lk_time_t timeout) THREAD_LOCK(state); - if (e->signalled) { - /* signalled, we're going to fall through */ + if (e->signaled) { + /* signaled, we're going to fall through */ if (e->flags & EVENT_FLAG_AUTOUNSIGNAL) { - /* autounsignal flag lets one thread fall through before unsignalling */ - e->signalled = false; + /* autounsignal flag lets one thread fall through before unsignaling */ + e->signaled = false; } } else { - /* unsignalled, block here */ + /* unsignaled, block here */ ret = wait_queue_block(&e->wait, timeout); } @@ -143,20 +143,20 @@ status_t event_signal(event_t *e, bool reschedule) THREAD_LOCK(state); - if (!e->signalled) { + if (!e->signaled) { if (e->flags & EVENT_FLAG_AUTOUNSIGNAL) { - /* try to release one thread and leave unsignalled if successful */ + /* try to release one thread and leave unsignaled if successful */ if (wait_queue_wake_one(&e->wait, reschedule, NO_ERROR) <= 0) { /* * if we didn't actually find a thread to wake up, go to - * signalled state and let the next call to event_wait + * signaled state and let the next call to event_wait * unsignal the event. */ - e->signalled = true; + e->signaled = true; } } else { - /* release all threads and remain signalled */ - e->signalled = true; + /* release all threads and remain signaled */ + e->signaled = true; wait_queue_wake_all(&e->wait, reschedule, NO_ERROR); } } @@ -182,7 +182,7 @@ status_t event_unsignal(event_t *e) { DEBUG_ASSERT(e->magic == EVENT_MAGIC); - e->signalled = false; + e->signaled = false; return NO_ERROR; } diff --git a/lib/cbuf/include/lib/cbuf.h b/lib/cbuf/include/lib/cbuf.h index f709e9e6..902628f3 100644 --- a/lib/cbuf/include/lib/cbuf.h +++ b/lib/cbuf/include/lib/cbuf.h @@ -104,7 +104,7 @@ size_t cbuf_peek(cbuf_t *cbuf, iovec_t *regions); * supplied data. * @param[in] len The maximum number of bytes to write to the cbuf. * @param[in] canreschedule Rescheduling policy passed through to the internal - * event when signalling the event to indicate that there is now data in the + * event when signaling the event to indicate that there is now data in the * buffer to be read. * * @return The number of bytes which were written (or skipped). diff --git a/platform/cc13xx/radio.c b/platform/cc13xx/radio.c index 2051ba40..1809d4b1 100644 --- a/platform/cc13xx/radio.c +++ b/platform/cc13xx/radio.c @@ -52,8 +52,8 @@ void ti_cc_rfc_cpe_0_irq(void) { // disable IRQ until thread handles and re-enables them in response to event NVIC_DisableIRQ(rfc_cpe_0_IRQn); - // reschedule if we woke a thread (indicated by !signalled) - arm_cm_irq_exit(!cpe0_evt.signalled); + // reschedule if we woke a thread (indicated by !signaled) + arm_cm_irq_exit(!cpe0_evt.signaled); } static inline uint32_t cpe0_reason(void) { @@ -76,8 +76,8 @@ void ti_cc_rfc_cmd_ack_irq(void) { arm_cm_irq_entry(); HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFACKIFG) = 0; event_signal(&ack_evt, false); - // reschedule if we woke a thread (indicated by !signalled) - arm_cm_irq_exit(!ack_evt.signalled); + // reschedule if we woke a thread (indicated by !signaled) + arm_cm_irq_exit(!ack_evt.signaled); } uint32_t radio_send_cmd(uint32_t cmd) { |