Repository: celix Updated Branches: refs/heads/develop 1e73e4d1c -> d970233fa
CELIX-77: add ifdefs to allow compilation for osx Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/d970233f Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/d970233f Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/d970233f Branch: refs/heads/develop Commit: d970233fa1ba3596681c648715f840fc852fe696 Parents: 1e73e4d Author: Bjoern Petri <[email protected]> Authored: Fri Dec 11 14:32:22 2015 +0100 Committer: Bjoern Petri <[email protected]> Committed: Fri Dec 11 14:32:22 2015 +0100 ---------------------------------------------------------------------- utils/private/src/thpool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/d970233f/utils/private/src/thpool.c ---------------------------------------------------------------------- diff --git a/utils/private/src/thpool.c b/utils/private/src/thpool.c index f81350e..6e7f372 100644 --- a/utils/private/src/thpool.c +++ b/utils/private/src/thpool.c @@ -15,9 +15,10 @@ #include <stdlib.h> #include <pthread.h> #include <errno.h> -#include <time.h> +#include <time.h> +#ifdef LINUX #include <sys/prctl.h> - +#endif #include "thpool.h" #ifdef THPOOL_DEBUG @@ -336,10 +337,12 @@ static void thread_hold () { * @return nothing */ static void* thread_do(struct thread* thread_p){ +#ifdef LINUX /* Set thread name for profiling and debuging */ char thread_name[128] = {0}; sprintf(thread_name, "thread-pool-%d", thread_p->id); prctl(PR_SET_NAME, thread_name); +#endif /* Assure all threads have been created before starting serving */ thpool_* thpool_p = thread_p->thpool_p;
