pthreads $ NativePthreadMutexAttr :: 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
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
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha value
private extern class NativePthreadMutexAttr in "C" `{ pthread_mutexattr_t * `}
new `{
pthread_mutexattr_t *attr = malloc(sizeof(pthread_mutexattr_t));
int r = pthread_mutexattr_init(attr);
if (r != 0) {
free(attr);
return NULL;
}
return attr;
`}
fun destroy `{ pthread_mutexattr_destroy(self); `}
fun set_type_normal `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_NORMAL); `}
fun set_type_recursive `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_RECURSIVE); `}
fun set_type_errorcheck `{ pthread_mutexattr_settype(self, PTHREAD_MUTEX_ERRORCHECK); `}
# pthread_mutexattr_setpshared
# pthread_mutexattr_setprotocol
# pthread_mutexattr_setproceiling
# pthread_mutexattr_setrobust_np
end
lib/pthreads/pthreads.nit:228,1--249,3