Top "Critical-section" questions

Critical section refers to either a piece of code that will run concurrently in several threads accessing global data or resources (requiring synchronisation), or a user-level spinlock combined with a mutex object under the Windows operating system.

Unhandled exception / Access violation writing location in a Mutex example

I'm working through an example of protecting a global double using mutexes, however I get the error - Unhandled exception …

c++ multithreading winapi critical-section waitformultipleobjects
pthreads : pthread_cond_signal() from within critical section

I have the following piece of code in thread A, which blocks using pthread_cond_wait() pthread_mutex_lock(&…

pthreads mutex signals critical-section
Multithreading and Critical Sections Use - C++

I'm a little confused as to the proper use of critical sections in multithreaded applications. In my application there are …

c++ multithreading visual-studio-2008 winapi critical-section
What is the purpose of the "PAUSE" instruction in x86?

I am trying to create a dumb version of a spin lock. Browsing the web, I came across a assembly …

parallel-processing x86 x86-64 intel critical-section
Win32 Critical Section vs Mutex Performance

I wrote a small program to compare the performance of Critical Section vs Mutex in Windows. On the tests I …

c++ multithreading winapi mutex critical-section
Understanding semaphores

I am reading about semaphores in "Operating System Concepts" (for those of you who know it), and I thought I …

semaphore critical-section
Disable Hardware & Software Interrupts

Is it possible to disable all interrupts with a ASM/C/C++ program to get full control about the processor? …

assembly x86 atomic interrupt critical-section
Confusion about the lock statement in C#

This is from MSDN: The lock keyword ensures that one thread does not enter a critical section of code while …

c# multithreading locking block critical-section
.crt section? What does this warning mean?

I've got this warning recently (VC++ 2010) warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators I'm …

c++ visual-studio-2010 msvcrt critical-section static-initializer
How do I make a critical section with Boost?

For my cross-platform application I have started to use Boost, but I can't understand how I can implement code to …

c++ multithreading boost synchronization critical-section