- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/private.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/private.hfa
r9cd5bd2 r31c967b 20 20 #endif 21 21 22 #include <signal.h>23 24 22 #include "kernel.hfa" 25 23 #include "thread.hfa" … … 51 49 #endif 52 50 53 extern "C" { 54 __attribute__((visibility("protected"))) int __cfaabi_pthread_create(pthread_t *_thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); 55 __attribute__((visibility("protected"))) int __cfaabi_pthread_join(pthread_t _thread, void **retval); 56 __attribute__((visibility("protected"))) pthread_t __cfaabi_pthread_self(void); 57 __attribute__((visibility("protected"))) int __cfaabi_pthread_attr_init(pthread_attr_t *attr); 58 __attribute__((visibility("protected"))) int __cfaabi_pthread_attr_destroy(pthread_attr_t *attr); 59 __attribute__((visibility("protected"))) int __cfaabi_pthread_attr_setstack( pthread_attr_t *attr, void *stackaddr, size_t stacksize ); 60 __attribute__((visibility("protected"))) int __cfaabi_pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ); 61 __attribute__((visibility("protected"))) int __cfaabi_pthread_sigqueue(pthread_t _thread, int sig, const union sigval value); 62 __attribute__((visibility("protected"))) int __cfaabi_pthread_sigmask( int how, const sigset_t *set, sigset_t *oset); 63 } 51 // #define READYQ_USE_LINEAR_AVG 52 #define READYQ_USE_LOGDBL_AVG 53 // #define READYQ_USE_LOGINT_AVG 54 55 #if defined(READYQ_USE_LINEAR_AVG) 56 typedef unsigned long long __readyQ_avg_t; 57 #elif defined(READYQ_USE_LOGDBL_AVG) 58 typedef double __readyQ_avg_t; 59 #elif defined(READYQ_USE_LOGDBL_AVG) 60 typedef unsigned long long __readyQ_avg_t; 61 #else 62 #error must pick a scheme for averaging 63 #endif 64 64 65 65 //----------------------------------------------------------------------------- 66 66 // Scheduler 67 union __attribute__((aligned(64))) __timestamp_t { 68 struct { 69 volatile unsigned long long tv; 70 volatile __readyQ_avg_t ma; 71 } t; 72 char __padding[192]; 73 }; 74 67 75 extern "C" { 68 76 void disable_interrupts() OPTIONAL_THREAD;
Note:
See TracChangeset
for help on using the changeset viewer.