On 21 Dec 2002 19:41:54 UT, [EMAIL PROTECTED] wrote: >I found SemRequest and SemClear to be the functions that i am searching for. But what >use is SemHandle? >The documentation doesn't state what the sem_key_low and sem_key_high is (means: I'm >too dumb to >understand it). Is this just some random number? How can I create a semamorph-handle >for use with >SemClear/SemRequest?
Assuming you are talking about a semaphore, you don't need SemHandle in your case. Just put a static ULONG variable in your driver's data segment and use the virtual address of this variable as sem_key like this: ULONG MyRAMSem = 0; VOID Function(VOID) { if( DevHelp_SemRequest((ULONG)(PULONG)&MyRAMSem, TIME_OUT) == 0 ) { do the critical stuff... DevHelp_SemClear((ULONG)(PULONG)&MyRAMSem); } else { ... } } SemHandle is used, to allow your driver to access a (16-bit) semaphore created by an application. Don't confuse the terms "in-use" and "owned", when reading the documetation... -- Ruediger "Rudi" Ihle ----------- To unsubscribe yourself from this list, send the following message to [EMAIL PROTECTED] unsubscribe acpi-os2 end