parlib: Add uthread_self()
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 13 Apr 2017 19:30:16 +0000 (15:30 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
commit33b167a8a4433500252d0508af574db33bc9e307
treead48756ea97433f778fab17bc84f847d7ef2627e
parent02ff797f2e7c5f8861a4b0f35d62ae7cbb63eb49
parlib: Add uthread_self()

Yes, this is just current_uthread, but having a layer of interposition is
useful for catching bugs.  Specifically, I'm worried about apps or
libraries calling one of the _self() functions from vcore context - they'd
get the ID of the thread running on that vcore, not the vcore itself.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/parlib/include/parlib/uthread.h
user/parlib/uthread.c
user/pthread/pthread.c