OSFlagPendAll question

Discussion to talk about software related topics only.
Post Reply
vsabino
Posts: 32
Joined: Wed May 14, 2008 8:45 am

OSFlagPendAll question

Post by vsabino »

Hi,
I have a question regarding this function, perhaps for all OSFlagPend variants.

If a task is waiting (blocked) forever (timeout = 0) on a particular bitmask, what would happen if I change the mask while it's waiting. Will OSFlagPendall() continue to wait for the original mask, or will the OS know that the mask was changed?

Thanks,
Victor
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: OSFlagPendAll question

Post by pbreed »

Wont know the mask has changed...
vsabino
Posts: 32
Joined: Wed May 14, 2008 8:45 am

Re: OSFlagPendAll question

Post by vsabino »

Ok. I thought that would be the case...

So, how would be a proper way to change the mask? introduce a timeout?
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: OSFlagPendAll question

Post by pbreed »

I'd use onf of the 32 possible flags as the change the mask flag....
Always have that one valid in the mask...
Then when you want to change the mask it wakes up changes the mask goes back to sleep...
Post Reply