Fix the pthread_setname_np test.

Fix the pthread_setname_np test to take into account that emulator kernels are
so old that they don't support setting the name of other threads.

The CLONE_DETACHED thread is obsolete since 2.5 kernels.

Rename kernel_id to tid.

Fix the signature of __pthread_clone.

Clean up the clone and pthread_setname_np implementations slightly.

Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d
This commit is contained in:
Elliott Hughes
2013-02-14 18:59:37 -08:00
parent 3e3b239d2b
commit 40eabe24e4
14 changed files with 106 additions and 115 deletions

View File

@@ -161,7 +161,7 @@ td_err_e
td_thr_get_info(td_thrhandle_t const * handle, td_thrinfo_t * info)
{
info->ti_tid = handle->tid;
info->ti_lid = handle->tid; // Our pthreads uses kernel ids for tids
info->ti_lid = handle->tid;
info->ti_state = TD_THR_SLEEP; /* XXX this needs to be read from /proc/<pid>/task/<tid>.
This is only used to see if the thread is a zombie or not */
return TD_OK;