Search found 107 matches

by Thargon
Sun Jun 03, 2018 4:14 am
Forum: Small Change Requests
Topic: Improvement on new interval system Topic is solved
Replies: 2
Views: 830

Re: Improvement on new interval system Topic is solved

Hi, in general you are completely right and I support your opinion. But in practice we are on a scale where overflows will only occur in rare cases as I mentioned at the end of my post. As I showed, given a 64 bit wide time_conv_t and a CH_CFG_ST_FREQUENCY of 1 MHz, you can still safely calculate ti...
by Thargon
Thu May 24, 2018 4:53 pm
Forum: ChibiOS/RT
Topic: "smart build" and comments
Replies: 3
Views: 641

Re: "smart build" and comments

1) Commenting out the defines with // is illegal, latest code would complain about that and not even compile because now chconf.h is checked for integrity. If a definition is missing then you get an #error. If I include another header where all those defines exist, that should not be illegal. I thi...
by Thargon
Thu May 24, 2018 2:35 pm
Forum: ChibiOS/RT
Topic: "smart build" and comments
Replies: 3
Views: 641

"smart build" and comments

Hi, I just encountered a very bad and as it seems not well documented limitation of the "smart build" feature. If the variable USE_SMART_BUILD is set to "yes" in the Makefile, os/rt/rt.mk will parse the chconf.h file. This parsing is incorrect, though, as it searches for all line...
by Thargon
Mon May 14, 2018 2:02 pm
Forum: ChibiOS/RT
Topic: Register Event for Foreign Thread
Replies: 8
Views: 1170

Re: Register Event for Foreign Thread

Adding the S function would make no sense for the intended use of the subsystem (where is the thread registering itself), however, changing the pointer would not be a problem outside the critical zone, a 32 bit write is atomic, the critical zone is there because the list insertion. If you say so. S...
by Thargon
Mon May 14, 2018 1:08 pm
Forum: ChibiOS/RT
Topic: Register Event for Foreign Thread
Replies: 8
Views: 1170

Re: Register Event for Foreign Thread

Yes, with the 32 bit limitation I meant the one-bit-per-source case. If sources share bits there can be any number (this is the way I do it). However, I'm a bit confused right now regarding the terms 'mask' and 'flag'. As I understand, a thread can register to a source by using a dedicated listener ...
by Thargon
Mon May 14, 2018 11:54 am
Forum: ChibiOS/RT
Topic: Register Event for Foreign Thread
Replies: 8
Views: 1170

Re: Register Event for Foreign Thread

Hm, I often map multiple events to the same mask as long as they are of the same type, like 1 = OS event, 2 = I/O event, 3 = shell event, ... In case there are multiple I/Os a thread listens to, for instance, I then check the flags of the listeners in case an event ocurred. I don't know any other wa...
by Thargon
Mon May 14, 2018 9:21 am
Forum: ChibiOS/RT
Topic: Register Event for Foreign Thread
Replies: 8
Views: 1170

Re: Register Event for Foreign Thread

Yes, I usually support this idea and so far it was completely fine for me. Actually I can still implement the wanted behavior following that pattern but only in a static way or with additional overhead. Let me give an example: There are two threads A and B. Both are already running and communication...
by Thargon
Fri May 11, 2018 12:50 pm
Forum: ChibiOS/RT
Topic: Register Event for Foreign Thread
Replies: 8
Views: 1170

Register Event for Foreign Thread

Hi, important fact first: I am still using ChibiOS/RT 17.6 and I have not checked if this question still applies for 18.2. I just want to register an event to an foreign thread (not 'currp'). In my case I have a control thread that configures several slaves , but calling 'chEvtRegister()' (or one of...
by Thargon
Tue Mar 06, 2018 6:30 pm
Forum: Safer C
Topic: [DISCUSSION] Rationale for yet another C variant
Replies: 19
Views: 9880

Re: [DISCUSSION] Rationale for yet another C variant

Hi, after some experiments with C-only and C++-only projects I have actually decided to use some mix of both for embedded programming. And actually much of it was inspired by ChibiOS ;) I agree, that C++ can do all the things you are looking for, Giovanni, but I also agree, that C++ code tends to be...
by Thargon
Mon Mar 05, 2018 3:00 pm
Forum: Small Change Requests
Topic: Improvement on new interval system Topic is solved
Replies: 2
Views: 830

Improvement on new interval system Topic is solved

Hi, I just had a closer look at the new interval system of the 18.2 release. I can not see the reason, why CH_CFG_TIME_TYPES_SIZE is limited to 16 and 32 bit size, though. Of course, there is the risk of overflows in the conversion functions so that 'time_conv_t' has always double the size than the ...

Go to advanced search