XQuartz: Fix prototypes for thread functions

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston 2011-04-21 15:19:12 -07:00
parent 7524dbd061
commit 3960115dbc
3 changed files with 9 additions and 5 deletions

View File

@ -950,7 +950,7 @@ environment the next time you start X11?", @"Startup xinitrc dialog");
[X11App prefs_synchronize];
}
static inline pthread_t create_thread(void *func, void *arg) {
static inline pthread_t create_thread(void *(*func)(void *), void *arg) {
pthread_attr_t attr;
pthread_t tid;

View File

@ -94,7 +94,7 @@ static pthread_mutex_t mieq_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t mieq_ready_cond = PTHREAD_COND_INITIALIZER;
/*** Pthread Magics ***/
static pthread_t create_thread(void *func, void *arg) {
static pthread_t create_thread(void *(*func)(void *), void *arg) {
pthread_attr_t attr;
pthread_t tid;
@ -305,7 +305,7 @@ void DarwinListenOnOpenFD(int fd) {
pthread_mutex_unlock(&fd_add_lock);
}
static void DarwinProcessFDAdditionQueue_thread(void *args) {
static void *DarwinProcessFDAdditionQueue_thread(void *args) {
/* TODO: Possibly adjust this to no longer be a race... maybe trigger this
* once a client connects and claims to be the WM.
*
@ -334,6 +334,8 @@ static void DarwinProcessFDAdditionQueue_thread(void *args) {
}
pthread_cond_wait(&fd_add_ready_cond, &fd_add_lock);
}
return NULL;
}
Bool DarwinEQInit(void) {

View File

@ -95,7 +95,7 @@ static int execute(const char *command);
static char *command_from_prefs(const char *key, const char *default_value);
/*** Pthread Magics ***/
static pthread_t create_thread(void *func, void *arg) {
static pthread_t create_thread(void *(*func)(void *), void *arg) {
pthread_attr_t attr;
pthread_t tid;
@ -199,7 +199,7 @@ typedef struct {
/* This thread accepts an incoming connection and hands off the file
* descriptor for the new connection to accept_fd_handoff()
*/
static void socket_handoff_thread(void *arg) {
static void *socket_handoff_thread(void *arg) {
socket_handoff_t *handoff_data = (socket_handoff_t *)arg;
int launchd_fd = -1;
int connected_fd;
@ -228,6 +228,8 @@ static void socket_handoff_thread(void *arg) {
fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);
DarwinListenOnOpenFD(launchd_fd);
return NULL;
}
static int create_socket(char *filename_out) {