X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/5a07183e26b7ca151959629420a83f59af5339f3..0edf44cfdbe2262d5c50bfa7368ba2692600babc:/import/stdc/posix/pthread.d?ds=inline diff --git a/import/stdc/posix/pthread.d b/import/stdc/posix/pthread.d index 2be0412..3b83ea0 100644 --- a/import/stdc/posix/pthread.d +++ b/import/stdc/posix/pthread.d @@ -384,6 +384,25 @@ else version( darwin ) int pthread_mutexattr_settype(pthread_mutexattr_t*, int); int pthread_setconcurrency(int); } +else version( freebsd ) +{ + enum + { + PTHREAD_MUTEX_ERRORCHECK = 1, + PTHREAD_MUTEX_RECURSIVE = 2, + PTHREAD_MUTEX_NORMAL = 3, + PTHREAD_MUTEX_ADAPTIVE_NP = 4, + PTHREAD_MUTEX_TYPE_MAX + } + const PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_ERRORCHECK; + + int pthread_attr_getguardsize(in pthread_attr_t*, size_t*); + int pthread_attr_setguardsize(pthread_attr_t*, size_t); + int pthread_getconcurrency(); + int pthread_mutexattr_gettype(pthread_mutexattr_t*, int*); + int pthread_mutexattr_settype(pthread_mutexattr_t*, int); + int pthread_setconcurrency(int); +} // // CPU Time (TCT) @@ -489,6 +508,24 @@ else version( darwin ) int pthread_setschedparam(pthread_t, int, in sched_param*); //int pthread_setschedprio(pthread_t, int); } +else version( freebsd ) +{ + enum + { + PTHREAD_SCOPE_PROCESS = 0, + PTHREAD_SCOPE_SYSTEM = 0x2 + } + + int pthread_attr_getinheritsched(in pthread_attr_t*, int*); + int pthread_attr_getschedpolicy(in pthread_attr_t*, int*); + int pthread_attr_getscope(in pthread_attr_t*, int*); + int pthread_attr_setinheritsched(pthread_attr_t*, int); + int pthread_attr_setschedpolicy(pthread_attr_t*, int); + int pthread_attr_setscope(in pthread_attr_t*, int); + int pthread_getschedparam(pthread_t, int*, sched_param*); + int pthread_setschedparam(pthread_t, int, sched_param*); + //int pthread_setschedprio(pthread_t, int); +} // // Stack (TSA|TSS) @@ -520,6 +557,15 @@ else version( darwin ) int pthread_attr_setstackaddr(pthread_attr_t*, void*); int pthread_attr_setstacksize(pthread_attr_t*, size_t); } +else version( freebsd ) +{ + int pthread_attr_getstack(in pthread_attr_t*, void**, size_t*); + int pthread_attr_getstackaddr(in pthread_attr_t*, void**); + int pthread_attr_getstacksize(in pthread_attr_t*, size_t*); + int pthread_attr_setstack(pthread_attr_t*, void*, size_t); + int pthread_attr_setstackaddr(pthread_attr_t*, void*); + int pthread_attr_setstacksize(pthread_attr_t*, size_t); +} // // Shared Synchronization (TSH)