Skip to content

Commit

Permalink
Merge pull request torvalds#209 from cemeyer/posix-host-freebsd
Browse files Browse the repository at this point in the history
pthread_t is a pointer type on FreeBSD
  • Loading branch information
Octavian Purdila authored Aug 16, 2016
2 parents f20b705 + 18e2b7c commit 1e6059f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/lkl/lib/posix-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void thread_exit(void)

static int thread_join(lkl_thread_t tid)
{
if (WARN_PTHREAD(pthread_join(tid, NULL)))
if (WARN_PTHREAD(pthread_join((pthread_t)tid, NULL)))
return -1;
else
return 0;
Expand Down Expand Up @@ -276,7 +276,11 @@ static void panic(void)

static long _gettid(void)
{
#ifdef __FreeBSD__
return (long)pthread_self();
#else
return syscall(SYS_gettid);
#endif
}

struct lkl_host_operations lkl_host_ops = {
Expand Down

0 comments on commit 1e6059f

Please sign in to comment.