xref: /aosp_15_r20/external/autotest/utils/named_semaphore/README (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1*9c5db199SXin LiA simple module to expose the standard sem_* functions in Linux needed for
2*9c5db199SXin Liusing named semaphores. To compile, run:
3*9c5db199SXin Li
4*9c5db199SXin Lipython setup.py build
5*9c5db199SXin Li
6*9c5db199SXin LiThis will produce a namedsem.so file; put this file somewhere on your python
7*9c5db199SXin Liimport path and you should be able to import it as a module called namedsem.
8*9c5db199SXin Li
9*9c5db199SXin LiBefore actually using this in python code, it really should be wrapped in
10*9c5db199SXin Lisomething like the threading.Semaphore class. The module simply exposes the raw
11*9c5db199SXin LiC functions with very little error checking.
12