Click here to Skip to main content
15,902,817 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery11-Jul-08 5:27
Mark Salsbery11-Jul-08 5:27 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME14-Jul-08 4:58
SRKSHOME14-Jul-08 4:58 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery14-Jul-08 5:43
Mark Salsbery14-Jul-08 5:43 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME14-Jul-08 19:09
SRKSHOME14-Jul-08 19:09 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery15-Jul-08 5:36
Mark Salsbery15-Jul-08 5:36 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME17-Jul-08 3:12
SRKSHOME17-Jul-08 3:12 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery17-Jul-08 5:37
Mark Salsbery17-Jul-08 5:37 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME12-Aug-08 1:05
SRKSHOME12-Aug-08 1:05 
Hi mark,
Finaly I am able resolve the issue.This issue is a classical example of starvation. The critical section is held by thread and is being released and requested again immediately in a tight while loop. This never allows other threads to acquire the critical section. But it is working on xp OS. This was leading to starvation on vista for the thread/threads waiting on that critical section. I have used the SwitchToThread() API call( sleep() also serve the purpose).But I found SwitchToThread() is better option. Looks like threading model on Vista is more efficient.

thanks for your help.
AnswerRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury11-Jul-08 10:26
professionalJoe Woodbury11-Jul-08 10:26 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME11-Jul-08 23:35
SRKSHOME11-Jul-08 23:35 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury12-Jul-08 7:07
professionalJoe Woodbury12-Jul-08 7:07 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Stephen Hewitt13-Jul-08 15:29
Stephen Hewitt13-Jul-08 15:29 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Stephen Hewitt13-Jul-08 15:29
Stephen Hewitt13-Jul-08 15:29 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME13-Jul-08 18:52
SRKSHOME13-Jul-08 18:52 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME17-Jul-08 3:15
SRKSHOME17-Jul-08 3:15 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury17-Jul-08 5:45
professionalJoe Woodbury17-Jul-08 5:45 
QuestionVC ++ help Pin
paresh_sarjani11-Jul-08 3:31
paresh_sarjani11-Jul-08 3:31 
AnswerRe: VC ++ help Pin
Cedric Moonen11-Jul-08 3:56
Cedric Moonen11-Jul-08 3:56 
GeneralRe: VC ++ help Pin
sudhir_Kumar11-Jul-08 19:53
sudhir_Kumar11-Jul-08 19:53 
Questionhow data is managed in CString class? Pin
nisha0000011-Jul-08 3:12
nisha0000011-Jul-08 3:12 
AnswerRe: how data is managed in CString class? Pin
Mark Salsbery11-Jul-08 5:38
Mark Salsbery11-Jul-08 5:38 
QuestionTryEnterCriticalSection() problem Pin
SRKSHOME11-Jul-08 2:42
SRKSHOME11-Jul-08 2:42 
AnswerRe: TryEnterCriticalSection() problem Pin
CPallini11-Jul-08 2:48
mveCPallini11-Jul-08 2:48 
GeneralRe: TryEnterCriticalSection() problem Pin
SRKSHOME11-Jul-08 2:54
SRKSHOME11-Jul-08 2:54 
GeneralRe: TryEnterCriticalSection() problem Pin
CPallini11-Jul-08 2:57
mveCPallini11-Jul-08 2:57 

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.