Skip to main content
13 events
when toggle format what by license comment
Aug 19, 2023 at 9:41 answer added ceztko timeline score: 0
Jan 13, 2022 at 7:11 comment added Codemeister Thank you Andy & etc. Specifically, I am looking for a cross- process lock with sub-second timeout support and release on program exit/crash so multiple C/C++ & Python programs can share a common hardware ADC and interleave their processing. The best I found was flock for a file in ram could be polled with 3 mSec sleeps using around 1% Cpu if waiting.
Jan 12, 2022 at 3:57 comment added Andy Dalton Linux has synchronization primitives, they don't get coupled with other types of events. What are you trying to do? What is the expected outcome? Would a condition variable solve your problem?
Jan 12, 2022 at 1:42 comment added Codemeister Aside from trying to learn Linux more, I was trying to control multiple processes and threads sharing the same hardware ADC converter many times a second with efficient locking. I found flock, but could not find a timeout option; SIGALRM was mentioned for forcing timeouts, but it is per process.
Jan 12, 2022 at 1:31 comment added Codemeister Boost libraries for Linux might provide better synchronization objects but I suspect they are layered on top of other kernel functions not designed for those purposes. Use of select might be a possibility but it seems not designed (or named) for general synchronization. I look and find things like stackoverflow.com/questions/15651857/… System D is one effort to update Linux I am aware of; I was wondering of there are others attempting to directly support higher-level scalable kernel functions - for complex synchronization in this case.
Jan 11, 2022 at 7:02 comment added U. Windl Maybe ask a concrete question: What are you trying to do, and what was the outcome?
Jan 11, 2022 at 4:55 review Close votes
Feb 15, 2022 at 3:02
Jan 10, 2022 at 21:53 comment added Codemeister I added a brief summary of WaitForMultipleObjects in description. Select and poll might be alternatives although I've only seen their use with sockets. I have since seen System V might have more but little used cross-process synchronization mechanisms, but I don't know anything about that. In my case, I needed to control access to shared hardware, and flock with a dummy file seemed the only choice, and adding a failsafe timeout seemed problematic. Windows has nice synchronization objects and functions that seem more appropriate than dummy files.
Jan 10, 2022 at 21:38 history edited Codemeister CC BY-SA 4.0
added 244 characters in body
Jan 9, 2022 at 18:38 comment added Andy Dalton I don't know what WaitForMultipleObjects is specifically, but that sounds similar to select or poll.
Jan 9, 2022 at 18:26 comment added terdon From context, I am guessing you are referring to kernel calls or something similar that would be used in the context of writing a piece of software and not about something a regular user of the OS would use, is that right? Please edit your question and clarify that, bearing in mind that most of us here have no knowledge of Windows so we have no idea if this WaitForMultipleObjects is a library, a kernel call, a graphical program or what.
S Jan 9, 2022 at 18:13 review First questions
Jan 11, 2022 at 7:02
S Jan 9, 2022 at 18:13 history asked Codemeister CC BY-SA 4.0