Click here to Skip to main content
15,894,825 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Pulley question Pin
Storm-blade1-Jul-21 4:49
professionalStorm-blade1-Jul-21 4:49 
AnswerRe: Pulley question Pin
DRHuff1-Jul-21 5:18
DRHuff1-Jul-21 5:18 
AnswerRe: Pulley question Pin
mngerhold1-Jul-21 22:20
mngerhold1-Jul-21 22:20 
RantThread management Linux vs Windows Pin
den2k881-Jul-21 3:34
professionalden2k881-Jul-21 3:34 
GeneralRe: Thread management Linux vs Windows Pin
Greg Utas1-Jul-21 3:42
professionalGreg Utas1-Jul-21 3:42 
GeneralRe: Thread management Linux vs Windows Pin
Richard Deeming1-Jul-21 4:11
mveRichard Deeming1-Jul-21 4:11 
GeneralRe: Thread management Linux vs Windows Pin
Richard MacCutchan1-Jul-21 4:23
mveRichard MacCutchan1-Jul-21 4:23 
GeneralRe: Thread management Linux vs Windows Pin
Greg Utas1-Jul-21 4:56
professionalGreg Utas1-Jul-21 4:56 
If he's porting a design where the threads think they're running under the same process, whose id they will all return, that design will have to be reworked.

If threads actually remap memory in the way that processes do, context switching between threads would be far more expensive. OP works on embedded systems where this could be unacceptable.

Having to drop into kernel mode to acquire or release a mutex is another overhead. If threads poll a mutex, that's about as idiotic as it gets if it's truly a spinlock. Having to introduce a condition variable (which has problems of its own) to avoid this would be yet another non-portable overhead.

I would bet that somewhere, someone implemented lightweight threads on Linux. The change may have been rejected by a collection of bozos, in which case it might be available as a variant from some vendor.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.

GeneralRe: Thread management Linux vs Windows Pin
  Forogar  1-Jul-21 4:33
professional  Forogar  1-Jul-21 4:33 
GeneralRe: Thread management Linux vs Windows Pin
den2k881-Jul-21 4:46
professionalden2k881-Jul-21 4:46 
GeneralRe: Thread management Linux vs Windows Pin
W Balboos, GHB1-Jul-21 4:36
W Balboos, GHB1-Jul-21 4:36 
GeneralRe: Thread management Linux vs Windows Pin
Nemanja Trifunovic1-Jul-21 4:56
Nemanja Trifunovic1-Jul-21 4:56 
GeneralRe: Thread management Linux vs Windows Pin
Greg Utas1-Jul-21 6:12
professionalGreg Utas1-Jul-21 6:12 
GeneralRe: Thread management Linux vs Windows Pin
den2k881-Jul-21 21:34
professionalden2k881-Jul-21 21:34 
GeneralRe: Thread management Linux vs Windows Pin
megaadam1-Jul-21 6:33
professionalmegaadam1-Jul-21 6:33 
GeneralRe: Thread management Linux vs Windows Pin
Greg Utas1-Jul-21 8:25
professionalGreg Utas1-Jul-21 8:25 
GeneralRe: Thread management Linux vs Windows Pin
den2k881-Jul-21 21:39
professionalden2k881-Jul-21 21:39 
GeneralW11 - are there Pro and Home versions? Pin
jsc421-Jul-21 1:03
professionaljsc421-Jul-21 1:03 
GeneralRe: W11 - are there Pro and Home versions? Pin
den2k881-Jul-21 1:43
professionalden2k881-Jul-21 1:43 
GeneralRe: W11 - are there Pro and Home versions? Pin
theoldfool1-Jul-21 2:23
professionaltheoldfool1-Jul-21 2:23 
GeneralRe: W11 - are there Pro and Home versions? Pin
den2k881-Jul-21 2:45
professionalden2k881-Jul-21 2:45 
GeneralRe: W11 - are there Pro and Home versions? Pin
jsc421-Jul-21 2:37
professionaljsc421-Jul-21 2:37 
GeneralRe: W11 - are there Pro and Home versions? Pin
Dan Neely1-Jul-21 3:00
Dan Neely1-Jul-21 3:00 
GeneralRe: W11 - are there Pro and Home versions? Pin
den2k881-Jul-21 3:03
professionalden2k881-Jul-21 3:03 
GeneralRe: W11 - are there Pro and Home versions? Pin
Dan Neely1-Jul-21 3:10
Dan Neely1-Jul-21 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.