LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

semaphores in Lab Windows

Hi All
 
I am working on a project and am working on Lab Windows. Am facing problems with threaded execution and am looking to introduce semaphores. Can anyone help me with semaphores in LW, like the syntax and co. Thanks in advance.
 
Anil Srivatsav
0 Kudos
Message 1 of 3
(3,594 Views)
Anil,
        CVI doesn't have semaphores as part of the libraries, however, we do have the ability to thread lock. If you look under the Utility Library>>Multithreading>>Thread Lock  you will find the function calls that act like semaphores. Look under the Multithreading library and you should find any commands that would be useful to your application. If you have any other questions about particular functions please feel free to let us know and well help you out. Hope that helps.
 
Regards,
 
Tyler Heikes
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,550 Views)

Hi Anil

There are advantages to using semaphores at times.  If you need the use of semaphores then I suggest using the windows SDK directly.

Example: Semaphores can be used for interprocess communication.  Different process can obtain a handle to the same semaphore object.

See functions:
CreateSemaphore
OpenSemaphore
ReleaseSemaphore

0 Kudos
Message 3 of 3
(3,541 Views)