Displaying 8 results from an estimated 8 matches for "entercriticalsection".
2007 Oct 21
2
Simulating RUBY_CRITICAL
...Windows::Synchronize
module in the windows-pr library (in CVS). Looking at the RUBY_CRITICAL
macro from rubysig.h, it basically looks like this (in pure Ruby):
def RUBY_CRITICAL(&block)
critical_section = [0].pack(''L'')
InitializeCriticalSection(critical_section)
EnterCriticalSection(critical_section)
block.call
LeaveCriticalSection(critical_section)
end
But, shouldn''t we ensure that we leave the critical section once
entered, like so?
# This is what''s currently in CVS
def RUBY_CRITICAL(&block)
critical_section = [0].pack(''L'...
2011 Apr 12
2
Threading issue
.... Simple memory operations work great within myfunc(). I am able to modify and view simple global variables in my Windows app such as integers (I havent tried a C++ class). The problem is I cannot perform operations such as creating a new thread (using afxbeginthread()) within my Windows app or use EnterCriticalSection() and LeaveCriticalSection(). Whenever I call any of these function the thread appears to get stuck in an infinite loop. I know a thread has been created and hangs because the CPU usage instantly increases to roughly 70% and never decreases as soon as the handler is called.
Note: if I call myfunc(...
2016 Jul 11
0
[PATCH] wave_out: fix casts
...71,7 +71,7 @@ Box ( const char* msg )
*/
static void CALLBACK
-wave_callback ( HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
+wave_callback ( HWAVEOUT hWave, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2 )
{
if ( uMsg == WOM_DONE ) {
EnterCriticalSection ( &cs );
@@ -125,7 +125,7 @@ Set_WIN_Params ( FILE_T dummyFile ,
outFormat.nBlockAlign = (outFormat.wBitsPerSample + 7) / 8 * outFormat.nChannels;
outFormat.nAvgBytesPerSec = outFormat.nSamplesPerSec * outFormat.nBlockAlign;
- switch ( waveOutOpen ( &dev, deviceID, &outForma...
2001 Feb 15
1
Pbs emulating Word2000
...not ThunkConnect32 VERSION.DLL
to VER.DLL
err:thunk:C16ThkSL01 Process 402bbcc0 did not ThunkConnect32 VERSION.DLL
to VER.DLL
fixme:task:PostEvent16 called for Win32 thread (0747)!
fixme:task:OldYield16 called for Win32 thread (008f)!
fixme:task:WaitEvent16 called for Win32 thread (0747)!
err:win32:EnterCriticalSection Critical section 0x402bace8 wait timed
out, retrying (60 sec)
*****
I m under Linux RedHat 7.0
THANKS for your help !!! ;-)
JLuc
2010 Nov 20
1
CRITICAL_SECTION hang my application
...When they try to add texts in parallel, a mixed text appear. So I decided to use critical section. When main thread tries to add text, the text adds perfectly, but when the second thread tries to add text - it hangs my app :( .
Here is the code in C++:
Code:
HWND__ *h_Edit = rtf_list->Handle;
EnterCriticalSection(&cr_sec);
CHARRANGE cr;
cr.cpMin = 0;
cr.cpMax = 0;
// App hangs on this line
SendMessage(h_Edit, EM_EXSETSEL, 0, (LPARAM)&cr);
//.....
LeaveCriticalSection(&cr_sec);
Before this I use:
Code:
CRITICAL_SECTION cr_sec;
InitializeCriticalSection(&cr_sec);
to initialize Cr...
2013 Feb 25
5
Puppet execution hangs for long periods of time
Hi,
I wrote a little "hello world" script and I am a little concerned by
execution that hangs for long periods of time.
*computer:*
Windows XP Professional Service Pack 3
Intel(R) Xeon(R) CPU
W3550 @ 3.07GHz
3.07GHz, 3.50 GB of RAM
*init.pp:*
class hello
{
notice(''Hello world!'')
}
*command line:*
puppet apply --debug -e ''include hello''
2006 Dec 07
0
Fwd: win32-service problems with patch
...Stop the service.
SetTheServiceStatus(SERVICE_STOPPED, NO_ERROR, 0, 0);
}
@@ -97,10 +91,10 @@
return result;
}
-VALUE Ruby_Service_Ctrl()
+VALUE Ruby_Service_Ctrl(VALUE self)
{
while (WaitForSingleObject(hStopEvent,0) == WAIT_TIMEOUT)
- {
+ {
__try
{
EnterCriticalSection(&csControlCode);
@@ -108,20 +102,22 @@
// Check to see if anything interesting has been signaled
if (waiting_control_code != IDLE_CONTROL_CODE)
{
- // if there is a code, create a ruby thread to deal with it
- // this might be over engineering...
2008 Mar 21
0
Wine release 0.9.58
...tion.
msrle32: Add the Romanian translation.
write: Add the Romanian translation.
write: Add the German translation.
localspl: Add the Romanian translation.
wineboot: Add the German translation.
wineboot: Add the Romanian translation.
quartz: Replace second EnterCriticalSection with LeaveCriticalSection (Smatch).
comdlg32: Update the German translation.
devenum: Add the Romanian translation.
oleaut32: Add the Romanian translation.
winecfg: Remove the unused IDS_WINE_VERSION resource.
Miko?aj Zalewski (4):
shell32: Remove DISCARDABLE from STR...