Re: temporary disable thread switching using pthreads



I am looking for a possibility to disable the thread switching for the
current process temporarily. This is a very simple way to build mutual
exclusive sections, without the need to protect the access to common
objects by mutexes everywhere in the code.

Pthreads do not and cannot work that way. Use locks to protect the
data. How would disabling thread switching help if other threads are
currently running already?

DS

.



Relevant Pages

  • Re: Vectors (cpu type idea)
    ... e.g., protect our marriages, protect our families, ... religion, it promotes anti-social behaviors, it spreads diseases, it ... in the US, divorce is common; ...
    (alt.lang.asm)
  • Re: semaphore question
    ... Mutexes protect data. ... Mutexes serialize execution of critical sections. ... mutex that protects the object that code manipulates. ...
    (comp.os.linux.development.system)
  • Re: Anti-Gun Hysteria!
    ... MINIMUM firearms protected to the Right of the People: ... employees to protect the common good. ... This means that all of the individual firearms used by the common ... US v Miller makes it clear this is the proper test (even if they didn't have ...
    (talk.politics.guns)
  • Re: OO and information oriented programming (was Re: Simple Parser)
    ... His point was simply that GIGO was far more *common* then than ... > 'fix' to filter out the broken information now throws away correct ... > impossible in general to protect against. ... There's clearly corrupt data (checksum errors, ...
    (comp.programming)
  • Re: The Ethics of Alternative Medicine
    ... Administration has the ethical responsibility to take the lead in this ... To protect the common good, there is a need to know not only ... what alternative medicine can do for us but what it can do to us. ...
    (misc.health.alternative)