Click here to Skip to main content
15,888,069 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
David Crow5-May-09 16:34
David Crow5-May-09 16:34 
AnswerRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 16:59
ForNow5-May-09 16:59 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow6-May-09 4:42
ForNow6-May-09 4:42 
Questioncan VC++ 6.0 talk with SharePoint Server Pin
s33335-May-09 10:24
s33335-May-09 10:24 
AnswerRe: can VC++ 6.0 talk with SharePoint Server Pin
Stuart Dootson5-May-09 10:37
professionalStuart Dootson5-May-09 10:37 
QuestionSemaphore Max count. Pin
_80865-May-09 6:57
_80865-May-09 6:57 
AnswerRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 7:26
professionalStuart Dootson5-May-09 7:26 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 16:36
_80865-May-09 16:36 
Stuart Dootson wrote:
So - in your case, initial count=3, max count=5, so the semaphore believes two of its 'slots' are filled when it is created. The first three waits on the semaphore succeed. Any waits after that will wait until ReleaseSemaphore is called and the thread can acquire the semaphore.


Is it like at first the limit cap would be 3(As it assumes the other 2 to be filled already) but once we start to release semaphores, the cap would be extended to 5?

For example:
initially available slots: 3 ; Filled slots :2 ; SemVar=3
S1 Created. Successful wait-through. SemVar-- = 2
S2 Created. Successful wait-through. SemVar-- = 1
S3 Created. Successful wait-through. SemVar-- = 0, becomes 0 and becomes non-signled.

S4 Cannot be created. Limit Reached. Keeps Waiting.

S1 Released. SemVar++ = 1 (Now will it add 2 more counts here?) so that SemVar becomes 3 . Hence the final limit becomes 5. (2 already in use S2,S3 after we release S1). So as I just said, the currently available slots would be 3.

Now S4 gets through.
S5 gets through.
S6 Gets through.

So we have S2,S3,S4,S5,S6 in the ultimate list?

Now the semaphore starts to operate on 0 to 5 limits. Rather than the 0 to 3 limit. Did I get you right?

----------------------------
286? WOWW!Blush | :O

GeneralRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 17:00
professionalStuart Dootson5-May-09 17:00 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 17:20
_80865-May-09 17:20 
GeneralRe: Semaphore Max count. Pin
_80866-May-09 6:36
_80866-May-09 6:36 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 7:24
professionalStuart Dootson6-May-09 7:24 
GeneralRe: Semaphore Max count. Pin
_80866-May-09 16:23
_80866-May-09 16:23 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 19:32
professionalStuart Dootson6-May-09 19:32 
QuestionHelp about Win32 Message loop Pin
reply2am5-May-09 4:48
reply2am5-May-09 4:48 
QuestionAnimatedGif drawing with openGL Pin
Jufranz5-May-09 4:10
Jufranz5-May-09 4:10 
QuestionHow to Convert _asm to Interinsics Pin
AB_dev5-May-09 3:32
AB_dev5-May-09 3:32 
AnswerRe: How to Convert _asm to Interinsics Pin
Stuart Dootson5-May-09 3:42
professionalStuart Dootson5-May-09 3:42 
GeneralRe: How to Convert _asm to Interinsics Pin
AB_dev5-May-09 3:47
AB_dev5-May-09 3:47 
GeneralRe: How to Convert _asm to Interinsics Pin
harold aptroot5-May-09 4:02
harold aptroot5-May-09 4:02 
GeneralRe: How to Convert _asm to Interinsics Pin
Stuart Dootson5-May-09 4:03
professionalStuart Dootson5-May-09 4:03 
AnswerRe: How to Convert _asm to Interinsics Pin
Randor 5-May-09 7:45
professional Randor 5-May-09 7:45 
QuestionHow to add web reference in my C++ project? Pin
eight5-May-09 3:29
eight5-May-09 3:29 
AnswerRe: How to add web reference in my C++ project? Pin
Stuart Dootson5-May-09 3:35
professionalStuart Dootson5-May-09 3:35 
GeneralRe: How to add web reference in my C++ project? Pin
eight5-May-09 16:16
eight5-May-09 16:16 

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.