次の方法で共有


Synchronization (Windows Embedded CE 6.0)

1/6/2010

In an OS on which several threads run concurrently, it is important to be able to synchronize the activities of various threads.

Windows Embedded CE provides several synchronization objects that enable you to synchronize a thread's actions with those of another thread. These objects include critical sections, mutexes, events, and semaphores. Each object type, such as memory maps, semaphores, events, message queues, mutexes, and watchdog timers, has its own namespace. Empty strings ("") are handled as named objects. On Windows desktop-based platforms, synchronization objects all share the same namespace.

You can also use interlocked functions to synchronize a thread.

Regardless of the synchronization method that you use, a thread synchronizes itself with another thread by releasing a synchronization object, and then entering a waiting state.

The synchronization object tells the OS what special event must occur before the thread can resume running. When that event occurs, the thread can again be scheduled for CPU time. After it is scheduled, the thread continues running. The thread is now synchronized with the event.

See Also

Concepts

Scheduling
Critical Section Objects
Mutex Objects
Event Object Notification
Semaphore Objects
Wait Functions
Interlocked Functions
Interprocess Synchronization
Message Queue Point-to-Point