Skip to content
Snippets Groups Projects
Commit 4ef378fc authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Fix Mac OS X build.

parent 61fcb6dd
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
#include <assert.h>
#include <limits.h>
#if defined(__FreeBSD__)
#if !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
......
......@@ -16,7 +16,7 @@ int FILL = SLAB_MIN_SIZE/sizeof(pthread_t);
void *
run(void *p __attribute__((unused)))
{
unsigned int seed = pthread_self();
unsigned int seed = (unsigned int) pthread_self();
int iterations = rand_r(&seed) % ITERATIONS;
pthread_t **slabs = slab_map(&arena);
for (int i = 0; i < iterations; i++) {
......@@ -27,7 +27,7 @@ run(void *p __attribute__((unused)))
slabs[osc][fill] = pthread_self();
}
}
pthread_yield();
sched_yield();
for (int osc = 0; osc < oscillation; osc++) {
for (int fill = 0; fill < FILL; fill+= 100) {
fail_unless(slabs[osc][fill] ==
......
......@@ -2,7 +2,7 @@
#include "unit.h"
#include <sys/mman.h>
#if defined(__FreeBSD__)
#if !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment