Search found 32 matches

by awygle
Tue Nov 22, 2016 5:50 am
Forum: Development and Feedback
Topic: chEvtWaitOne in NIL?
Replies: 2
Views: 2416

Re: chEvtWaitOne in NIL?

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 messag...
by awygle
Mon Nov 21, 2016 8:32 am
Forum: General Support
Topic: Producer from ISRs Example / S-Locked Query Topic is solved
Replies: 3
Views: 4096

Re: Producer from ISRs Example / S-Locked Query Topic is solved

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, henc...
by awygle
Mon Nov 14, 2016 8:03 pm
Forum: Development and Feedback
Topic: chEvtWaitOne in NIL?
Replies: 2
Views: 2416

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 are...
by awygle
Thu Nov 10, 2016 8:32 pm
Forum: Bug Reports
Topic: NIL OSAL multiply typedefs eventflags_t Topic is solved
Replies: 1
Views: 2511

NIL OSAL multiply typedefs eventflags_t Topic is solved

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...
by awygle
Thu Oct 27, 2016 7:22 am
Forum: General Support
Topic: Why is chThdGetSelfX() X-class?
Replies: 2
Views: 2284

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 perha...
by awygle
Thu Oct 27, 2016 6:56 am
Forum: General Support
Topic: Understanding Queues
Replies: 2
Views: 2477

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
by awygle
Thu Oct 27, 2016 6:55 am
Forum: General Support
Topic: Why is chThdGetSelfX() X-class?
Replies: 2
Views: 2284

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 act...
by awygle
Tue Oct 25, 2016 9:16 pm
Forum: General Support
Topic: Understanding Queues
Replies: 2
Views: 2477

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 conside...
by awygle
Fri Oct 21, 2016 8:21 am
Forum: General Support
Topic: style code check tool
Replies: 6
Views: 3398

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.
by awygle
Sun Oct 16, 2016 8:27 pm
Forum: Bug Reports
Topic: UART driver ISR convenience macro bug Topic is solved
Replies: 2
Views: 3195

UART driver ISR convenience macro bug Topic is solved

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. Obvio...

Go to advanced search