pthreads :: NativePthreadAttr :: destroy
pthreads :: NativePthreadAttr :: new
pthreads $ NativePthreadAttr :: 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 :: Pointer :: defaultinit
core :: Object :: defaultinit
pthreads :: NativePthreadAttr :: destroy
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 :: NativePthreadAttr :: new
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 NativePthreadAttr in "C" `{ pthread_attr_t * `}
new `{
pthread_attr_t attr;
int r = pthread_attr_init(&attr);
if (r == 0) {
pthread_attr_t *pattr = malloc(sizeof(pthread_attr_t));
memmove(pattr, &attr, sizeof(pthread_attr_t));
return pattr;
}
return NULL;
`}
fun destroy `{
pthread_attr_destroy(self);
`}
# Most features of this class are still TODO
#
# * pthread_attr_setaffinity_np(3)
# * pthread_attr_setdetachstate
# * pthread_attr_setguardsize
# * pthread_attr_setinheritsched
# * pthread_attr_setschedparam
# * pthread_attr_setschedpolicy
# * pthread_attr_setscope
# * pthread_attr_setstack
# * pthread_attr_setstackaddr
# * pthread_attr_setstacksize
end
lib/pthreads/pthreads.nit:180,1--208,3