pthreads :: NativePthreadKey :: get
pthreads :: NativePthreadKey :: new
pthreads :: NativePthreadKey :: set
pthreads $ NativePthreadKey :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Pointer :: defaultinit
pthreads :: NativePthreadKey :: get
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Pointer :: native_equals
pthreads :: NativePthreadKey :: new
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha valuepthreads :: NativePthreadKey :: set
private extern class NativePthreadKey in "C" `{ pthread_key_t * `}
new `{
pthread_key_t *key = malloc(sizeof(pthread_key_t));
int r = pthread_key_create(key, NULL);
if (r != 0) {
free(key);
return NULL;
}
return key;
`}
fun get: nullable Object `{
void *val = pthread_getspecific(*self);
if (val == NULL) val = null_Object();
return val;
`}
fun set(val: nullable Object) `{
pthread_setspecific(*self, val);
`}
end
lib/pthreads/pthreads.nit:251,1--271,3