From 880c109f2009f96ef3eb9c5635a29da3cfd4f923 Mon Sep 17 00:00:00 2001 From: Peter Mitsis Date: Wed, 15 Apr 2015 12:00:24 -0400 Subject: [PATCH] Remove references to deprecated W/WT naming convention The W/WT naming convention is not used anymore. Signed-off-by: Peter Mitsis --- kernel/microkernel/channel/K_ChGReq.c | 18 +++++++++++------- kernel/microkernel/channel/K_ChPReq.c | 18 +++++++++++------- kernel/microkernel/channel/K_ChProc.c | 4 ++-- kernel/microkernel/k_event.c | 8 ++++---- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/kernel/microkernel/channel/K_ChGReq.c b/kernel/microkernel/channel/K_ChGReq.c index b67801d3588..61a3ebe3346 100644 --- a/kernel/microkernel/channel/K_ChGReq.c +++ b/kernel/microkernel/channel/K_ChGReq.c @@ -178,16 +178,20 @@ void K_ChRecvReq(struct k_args *RequestOrig) ChxxxGetTimeType((K_ARGS_ARGS *)&(RequestProc->Args))) { /*{ call is blocking } */ INSERT_ELM(pPipe->Readers, RequestProc); - RequestProc->Comm = CHDEQ_TMO; /* This is really only - necessay in the case - of a WT */ + /* + * NOTE: It is both faster and simpler to blindly assign the + * CHDEQ_TMO microkernel command to the packet even though it + * is only useful to the finite timeout case. + */ + RequestProc->Comm = CHDEQ_TMO; if (_TIME_B == ChxxxGetTimeType( (K_ARGS_ARGS *)&(RequestProc->Args))) { - /* { TIME_B } */ - RequestProc->Time.timer = - NULL; /* If the writer specified a W, - then NULL the timer */ + /* + * The writer specified TICKS_UNLIMITED. + * NULL the timer. + */ + RequestProc->Time.timer = NULL; return; } else { /* { TIME_BT } */ diff --git a/kernel/microkernel/channel/K_ChPReq.c b/kernel/microkernel/channel/K_ChPReq.c index 55c7c38349e..3fc5a0b6598 100644 --- a/kernel/microkernel/channel/K_ChPReq.c +++ b/kernel/microkernel/channel/K_ChPReq.c @@ -205,16 +205,20 @@ void K_ChSendReq(struct k_args *RequestOrig) ChxxxGetTimeType((K_ARGS_ARGS *)&(RequestProc->Args))) { /*{ call is blocking } */ INSERT_ELM(pPipe->Writers, RequestProc); - RequestProc->Comm = CHENQ_TMO; /* This is really only - necessay in the case - of a WT */ + /* + * NOTE: It is both faster and simpler to blindly assign the + * CHENQ_TMO microkernel command to the packet even though it + * is only useful to the finite timeout case. + */ + RequestProc->Comm = CHENQ_TMO; if (_TIME_B == ChxxxGetTimeType( (K_ARGS_ARGS *)&(RequestProc->Args))) { - /* { TIME_B } */ - RequestProc->Time.timer = - NULL; /* If the writer specified a W, - then NULL the timer */ + /* + * The writer specified TICKS_UNLIMITED. + * NULL the timer. + */ + RequestProc->Time.timer = NULL; return; } else { /* { TIME_BT } */ diff --git a/kernel/microkernel/channel/K_ChProc.c b/kernel/microkernel/channel/K_ChProc.c index 1f2dc391525..264898da3e8 100644 --- a/kernel/microkernel/channel/K_ChProc.c +++ b/kernel/microkernel/channel/K_ChProc.c @@ -482,7 +482,7 @@ int WriterInProgressIsBlocked(struct pipe_struct *pPipe, /*__ASSERT_NO_MSG( NULL==pReader); */ /* first condition: request cannot wait any longer: must be - - * (non-blocked) or WT with a killed timer */ + * (non-blocked) or a finite timed wait with a killed timer */ TimeType = ChxxxGetTimeType((K_ARGS_ARGS *)&(pWriter->Args)); option = ChxxxGetChOpt((K_ARGS_ARGS *)&(pWriter->Args)); if (((_TIME_B == TimeType) && (_ALL_N == option)) || @@ -527,7 +527,7 @@ int ReaderInProgressIsBlocked(struct pipe_struct *pPipe, /*__ASSERT_NO_MSG( NULL==pWriter); */ /* first condition: request cannot wait any longer: must be - - * (non-blocked) or WT with a killed timer */ + * (non-blocked) or a finite timed wait with a killed timer */ TimeType = ChxxxGetTimeType((K_ARGS_ARGS *)&(pReader->Args)); option = ChxxxGetChOpt((K_ARGS_ARGS *)&(pReader->Args)); if (((_TIME_B == TimeType) && (_ALL_N == option)) || diff --git a/kernel/microkernel/k_event.c b/kernel/microkernel/k_event.c index e992fe0d1fc..a839e3ca542 100644 --- a/kernel/microkernel/k_event.c +++ b/kernel/microkernel/k_event.c @@ -137,9 +137,8 @@ void K_event_test(struct k_args *A) E->status = 0; A->Time.rcode = RC_OK; } else { - if (likely(A->Time.ticks != - TICKS_NONE)) {/* Caller specified W - operation */ + if (likely(A->Time.ticks != TICKS_NONE)) { + /* Caller will wait for the event */ if (likely(E->waiter == NULL)) { A->Ctxt.proc = K_Task; E->waiter = A; @@ -155,7 +154,8 @@ void K_event_test(struct k_args *A) waiter present */ } - } else { /* Caller did not specify W */ + } else { + /* Caller will not wait for the event */ A->Time.rcode = RC_FAIL; } }