[techtalk] SMP/threaded programming

TeknoDragon andross at ghettobox.dhs.org
Fri Oct 22 19:54:33 EST 1999


On Wed, 20 Oct 1999, Serena Del Bianco wrote:

> that wont work if you're using threads either
> imagine that thread 1 tries to execute that code and x is 0
> it will execute (*x == 0) and it will see the expression is true and will
> execute x++ then, thread 1 is preempted and thread 2 starts executing

yes, I understand SMP programming concepts...

as I said, I was assuming I could garuntee testset was an *atomic*
function... i.e. indivisible and possibly smaller than the timeslice of a
scheduler... like a few i/o functions... (don't care to look them up now)

I'd probably have to look over the SMP kernel source and see what they use
for semaphores...


************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list