#include <stdlib.h>
#include <string.h>
#include <err.h>
+#include <unistd.h>
#include <pthread.h>
#include <mach/mach.h>
}
}
}
+ return NULL;
}
static inline void
printf("calibration_count=%d calibration_usec=%d\n",
calibration_count, calibration_usec);
}
+ return NULL;
}
static void *
if (client_delay) {
usleep(client_delay);
}
+ return NULL;
}
void *client(void *threadarg)
mach_msg_header_t *req, *reply;
mach_port_t bsport, servport;
kern_return_t ret;
- long server_num = (long) threadarg;
+ int server_num = (int) threadarg;
void *ints = malloc(sizeof(u_int32_t) * num_ints);
if (verbose)
}
free(ints);
- return;
+ return NULL;
}
static void
if (ret != 0)
err(1, "pthread_create()");
if (verbose)
- printf("created pthread 0x%x\n", thread->tid);
+ printf("created pthread %p\n", thread->tid);
} else {
thread->pid = fork();
if (thread->pid == 0) {
if (verbose)
- printf("calling 0x%x(0x%x)\n", fn, arg);
+ printf("calling %p(%p)\n", fn, arg);
fn(arg);
exit(0);
}
if (threaded) {
kern_return_t ret;
if (verbose)
- printf("joining thread 0x%x\n", thread->tid);
+ printf("joining thread %p\n", thread->tid);
ret = pthread_join(thread->tid, NULL);
if (ret != KERN_SUCCESS)
- err(1, "pthread_join(0x%x)", thread->tid);
+ err(1, "pthread_join(%p)", thread->tid);
} else {
int stat;
if (verbose)