Annotation of qemu/qemu-thread.h, revision 1.1.1.3

1.1       root        1: #ifndef __QEMU_THREAD_H
                      2: #define __QEMU_THREAD_H 1
                      3: 
1.1.1.3 ! root        4: #include <inttypes.h>
1.1       root        5: 
                      6: typedef struct QemuMutex QemuMutex;
                      7: typedef struct QemuCond QemuCond;
                      8: typedef struct QemuThread QemuThread;
                      9: 
1.1.1.3 ! root       10: #ifdef _WIN32
        !            11: #include "qemu-thread-win32.h"
        !            12: #else
        !            13: #include "qemu-thread-posix.h"
        !            14: #endif
        !            15: 
1.1       root       16: void qemu_mutex_init(QemuMutex *mutex);
1.1.1.2   root       17: void qemu_mutex_destroy(QemuMutex *mutex);
1.1       root       18: void qemu_mutex_lock(QemuMutex *mutex);
                     19: int qemu_mutex_trylock(QemuMutex *mutex);
                     20: void qemu_mutex_unlock(QemuMutex *mutex);
                     21: 
                     22: void qemu_cond_init(QemuCond *cond);
1.1.1.2   root       23: void qemu_cond_destroy(QemuCond *cond);
1.1.1.3 ! root       24: 
        !            25: /*
        !            26:  * IMPORTANT: The implementation does not guarantee that pthread_cond_signal
        !            27:  * and pthread_cond_broadcast can be called except while the same mutex is
        !            28:  * held as in the corresponding pthread_cond_wait calls!
        !            29:  */
1.1       root       30: void qemu_cond_signal(QemuCond *cond);
                     31: void qemu_cond_broadcast(QemuCond *cond);
                     32: void qemu_cond_wait(QemuCond *cond, QemuMutex *mutex);
                     33: 
                     34: void qemu_thread_create(QemuThread *thread,
                     35:                        void *(*start_routine)(void*),
                     36:                        void *arg);
1.1.1.3 ! root       37: void qemu_thread_get_self(QemuThread *thread);
        !            38: int qemu_thread_is_self(QemuThread *thread);
1.1.1.2   root       39: void qemu_thread_exit(void *retval);
                     40: 
1.1       root       41: #endif

unix.superglobalmegacorp.com