Thanks Giovanni,
I also noticed that there used to be chEvtWaitAnyTimeoutS in NIL but it got removed during the RT4/NIL2 merge - is this because RT did not have such a function? I found it useful when I needed to wait on either a mailbox message or an event - I could raise an event and send a ...
Search found 32 matches
- Tue Nov 22, 2016 5:50 am
- Forum: Development and Feedback
- Topic: chEvtWaitOne in NIL?
- Replies: 2
- Views: 3642
- Mon Nov 21, 2016 8:32 am
- Forum: General Support
- Topic: Producer from ISRs Example / S-Locked Query
- Replies: 3
- Views: 6147
Re: Producer from ISRs Example / S-Locked Query
When sleeping in a locked state (using S-class functions), interrupts are re-enabled when the thread is switched out, and disabled again when the thread is switched back in. (More properly, the system lock is released - this may or may not be the same as "interrupts" on all platforms, hence ...
- Mon Nov 14, 2016 8:03 pm
- Forum: Development and Feedback
- Topic: chEvtWaitOne in NIL?
- Replies: 2
- Views: 3642
chEvtWaitOne in NIL?
Hi all,
RT events have three straightforward ways to wait for events - EvtWaitAny, EvtWaitAll, and EvtWaitOne. NIL events have only EvtWaitAny. In looking at the code it seems very easy to add support for WaitOne and WaitAll - is there a reason to leave these out from NIL?
I understand RT events ...
RT events have three straightforward ways to wait for events - EvtWaitAny, EvtWaitAll, and EvtWaitOne. NIL events have only EvtWaitAny. In looking at the code it seems very easy to add support for WaitOne and WaitAll - is there a reason to leave these out from NIL?
I understand RT events ...
- Thu Nov 10, 2016 8:32 pm
- Forum: Bug Reports
- Topic: NIL OSAL multiply typedefs eventflags_t
- Replies: 1
- Views: 3931
NIL OSAL multiply typedefs eventflags_t
The NIL OSAL (osal.h) contains a typedef for the eventflags_t type, which has been moved into chtypes.h. This still works on the STM32 chips because the NIL typedef is for a uint32_t and that's what eventflags_t is for STM32, but it may not be for other ports and it's fragile if that type changes in ...
- Thu Oct 27, 2016 7:22 am
- Forum: General Support
- Topic: Why is chThdGetSelfX() X-class?
- Replies: 2
- Views: 3438
Re: Why is chThdGetSelfX() X-class?
Anyway, those functions can be called from ISR, for example to see which thread has been preempted by the ISR for statistics.
This is an excellent point that I hadn't considered. I was just thinking that perhaps I was wrong, or that if they had no use (and in fact were dangerous) in ISRs that ...
This is an excellent point that I hadn't considered. I was just thinking that perhaps I was wrong, or that if they had no use (and in fact were dangerous) in ISRs that ...
- Thu Oct 27, 2016 6:56 am
- Forum: General Support
- Topic: Understanding Queues
- Replies: 2
- Views: 3540
Re: Understanding Queues
Thanks for your help, Giovanni, the mailboxes + pools approach is working great
. I am really grateful that you decided to share code between RT and NIL for these things and for binary semaphores, a lot of RTOS writers would not have bothered
- Thu Oct 27, 2016 6:55 am
- Forum: General Support
- Topic: Why is chThdGetSelfX() X-class?
- Replies: 2
- Views: 3438
Why is chThdGetSelfX() X-class?
Why are calls like chThdGetSelfX() and chThdGetPriorityX() X-class APIs? I don't understand how they would have a well-defined meaning in an ISR context. Is it because there isn't a class defined for "you can call this outside lock zones but not in ISRs"? Or am I just confused and they actually ...
- Tue Oct 25, 2016 9:16 pm
- Forum: General Support
- Topic: Understanding Queues
- Replies: 2
- Views: 3540
Understanding Queues
Hi all,
I have an application with an architecture similar to the Actor model ( Wiki link ) where a queue of fixed-length buffers ("messages") is processed one at a time by a worker thread. I am trying to understand the best way to do this in ChibiOS (specifically NIL, although I'd consider RT if ...
I have an application with an architecture similar to the Actor model ( Wiki link ) where a queue of fixed-length buffers ("messages") is processed one at a time by a worker thread. I am trying to understand the best way to do this in ChibiOS (specifically NIL, although I'd consider RT if ...
- Fri Oct 21, 2016 8:21 am
- Forum: General Support
- Topic: style code check tool
- Replies: 6
- Views: 5238
Re: style code check tool
As another alternative, I was able to put together something to do this in about an hour using clang-format.
- Sun Oct 16, 2016 8:27 pm
- Forum: Bug Reports
- Topic: UART driver ISR convenience macro bug
- Replies: 2
- Views: 4955
UART driver ISR convenience macro bug
Hi all,
In creating a UART driver for my MSP430X port of ChibiOS, I've run into the following problem.
In the helper macro for calling the RX complete ISR, _uart_rx_complete_isr_code, there is a call to a function uart_enter_rx_idle_loop. This is a local (static) method of the STM32 UART port ...
In creating a UART driver for my MSP430X port of ChibiOS, I've run into the following problem.
In the helper macro for calling the RX complete ISR, _uart_rx_complete_isr_code, there is a call to a function uart_enter_rx_idle_loop. This is a local (static) method of the STM32 UART port ...