3 ms·
Show HN: A thread hierarchy management library in C
- Koshkin 6y agoAnd for those of us who write C++ there's always Intel's Threading Building Blocks. (Not sure if any other language has something equal in power and convenience.)
- dman 6y agoWould openmp fit in with how you use TBB? In the past I have used them to solve similar problems.
- Koshkin 6y agoTBB is based on the use of nested threads. We rely on much of what TBB has to offer, which includes concurrent containers and flowgraphs. Here's a nice overview by Mike Voss of what makes TBB different from OpenMP and C++ standard threading: https://software.intel.com/content/www/us/en/develop/articles/intel-threading-building-blocks-openmp-or-native-threads.html https://software.intel.com/content/www/us/en/develop/article....
- mratsim 6y agoI've written Weave for the Nim programming language: - https://github.com/mratsim/weave https://github.com/mratsim/weave - RFC that describes the goals: https://github.com/nim-lang/RFCs/issues/160 https://github.com/nim-lang/RFCs/issues/160
- iTokio 6y agoIt reminds me of https://github.com/sustrik/libdill https://github.com/sustrik/libdill
- rurban 6y agoMe not. Dill is to call coros with a native C ABI, whilst this is to orchestrate native threads, calls into the threads are setup via pipes, not function calls. both are doing the most natural thing for proper concurrency. nthm with true concurrency (native threads). dill with fake concurrency, coros only, aka green threads.
- mancini0 6y agoStupid question because I am very new to embedded programming and C (I started my journey this weekend), but could one use freertos's tasks library in a regular x86 desktop application to accomplish something similar?
- anitil 6y agoNot stupid at all. Like many early questions in programming, it's actually a fairly deep. Because FreeRTOS is unlikely to play nice with your host OS, typically you'd need to emulate a target (say, arm) using an emulator like qemu. Once you're at that point, you could run it like any other program. There's probably more complexity to it like building an image but there'd be a bunch of tutorials for this. When would you typically do this? For testing your FreeRTOS (or other bare metal) code without actually loading it on to your device and power cycling it. Maybe as part of a regression test