From: Michael P. <la...@us...> - 2010-02-07 13:28:40
|
Update of /cvsroot/bepdf/BePDF/xpdf/beos/compat In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv6951/compat Added Files: pthread.cc pthread.h Log Message: Moved pthread.* files into compat directory. They are needed building under BeOS only. Haiku already provides the functionality. --- NEW FILE: pthread.cc --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bepdf/BePDF/xpdf/beos/compat/pthread.cc //======================================================================== // // Compatibility pthread functions. // // Copyright 2004-2005 Michael W. Pfeiffer // //======================================================================== #include "pthread.h" void pthread_mutex_init(pthread_mutex_t* mutex, void* flags) { *mutex = create_sem(1, "pthread_mutex"); } void pthread_mutex_destroy(pthread_mutex_t* mutex){ delete_sem(*mutex); *mutex = 0; } void pthread_mutex_lock(pthread_mutex_t* mutex){ while (acquire_sem(*mutex) == B_INTERRUPTED); } void pthread_mutex_unlock(pthread_mutex_t* mutex){ release_sem(*mutex); } --- NEW FILE: pthread.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bepdf/BePDF/xpdf/beos/compat/pthread.h //======================================================================== // // Compatibility pthread functions. // // Copyright 2004-2005 Michael W. Pfeiffer // //======================================================================== #ifndef _P_THREAD_H #define _P_THREAD_H #include <OS.h> typedef sem_id pthread_mutex_t; void pthread_mutex_init(pthread_mutex_t* mutex, void* flags); void pthread_mutex_destroy(pthread_mutex_t* mutex); void pthread_mutex_lock(pthread_mutex_t* mutex); void pthread_mutex_unlock(pthread_mutex_t* mutex); #endif |