// // Get ID. // chpl_taskID_t chpl_task_getId(void) { chpl_taskID_t tid; enter_(); tid = (chpl_taskID_t)myth_self(); return_from_(); return tid; }
/* Function: myth_set_custom_data TODO: description. Parameters: x - TODO: parameters. Returns: TODO: return value. See Also: TODO: see also. */ void myth_wsapi_set_hint(myth_thread_t th,void **data,size_t *size) { if (th==NULL)th=myth_self(); void *newdata=*data; size_t newsize=*size; *data=th->custom_data_ptr; *size=th->custom_data_size; th->custom_data_ptr=newdata; th->custom_data_size=newsize; }
/* Function: myth_custom_data_ptr TODO: description. Parameters: x - TODO: parameters. Returns: TODO: return value. See Also: TODO: see also. */ void *myth_wsapi_get_hint_ptr(myth_thread_t th) { if (th==NULL)th=myth_self(); return th->custom_data_ptr; }
/* Function: myth_custom_data_size TODO: description. Parameters: x - TODO: parameters. Returns: TODO: return value. See Also: TODO: see also. */ size_t myth_wsapi_get_hint_size(myth_thread_t th) { if (th==NULL)th=myth_self(); return th->custom_data_size; }
pthread_t pthread_self(void) { //printf("pthread_self\n"); pthread_t x = (pthread_t)myth_self(); //printf("pthread_self -> %lx\n", x); return x; }