tag:blogger.com,1999:blog-5246987755651065286.post3586438237837748028..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 07-08-11 - Event Count and Condition Variablecbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5246987755651065286.post-60689561213733920122011-07-08T23:18:27.042-07:002011-07-08T23:18:27.042-07:00A related problem is
SignalObjectAndWait
which w...A related problem is<br /><br />SignalObjectAndWait<br /><br />which would be a lovely function to use for implementing condition_var (it basically is the heart of condition var - it signals one handle and waits on another handle in one op), but it's Win2k+ only so it's slightly better than Vista+ but still not actually usable in code that has to work on any Windows.<br /><br />I don't really understand who is writing code that knows they can use Vista+ only APIs. I guess people who release many versions for various hardware/OS combos.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-37487667165780643442011-07-08T23:00:19.329-07:002011-07-08T23:00:19.329-07:00Ah ok, I still call everything WIN32. :)Ah ok, I still call everything WIN32. :)Branimir Karadžićhttps://www.blogger.com/profile/08258281434387357224noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-18733286633130736062011-07-08T22:46:42.051-07:002011-07-08T22:46:42.051-07:00BTW when I say "Win32" I mean "pre-...BTW when I say "Win32" I mean "pre-Vista" because if you're Vista+ you should be running 64 bit and then I refer to it as "Win64".<br /><br />It's way too much pain in the ass to deal with all the possible permutations of clients, so I simplify it to :<br /><br />"win32" :<br />Win95+<br />32 bit<br />no SSE gaurantee<br /><br />"Win64" :<br />Vista+<br />64 bit<br />has at least SSE2<br />has cmpx128 (*)<br /><br />(*) = if you are in the weird gap of 64-bit chips that don't have cmpx128 I hate you and you get treated as win32cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-21407074431385582552011-07-08T22:39:41.123-07:002011-07-08T22:39:41.123-07:00Yeah, I know. It's nice, but it's Vista+ ...Yeah, I know. It's nice, but it's Vista+ which means as a software writer you just can't use it.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-41954637280418887702011-07-08T22:36:13.870-07:002011-07-08T22:36:13.870-07:00>>"Unfortunately, on Win32 you don'...>>"Unfortunately, on Win32 you don't have condition_varaiable at all"<br /><br />Check this out:<br />http://msdn.microsoft.com/en-us/library/ms683469%28v=vs.85%29.aspx<br /><br />It maps 1:1 to pthread_cond_*...<br /><br />InitializeConditionVariable == pthread_cond_init<br />WakeConditionVariable == pthread_cond_signal<br />WakeAllConditionVariable == pthread_cond_broadcast<br />etc.Branimir Karadžićhttps://www.blogger.com/profile/08258281434387357224noreply@blogger.com