6 #include <sys/thread.h> 10 #define ra_check ra_check_ 28 rset=rs_alloc(RS_EMPTY);
30 if ( *check_type == CHECK_PROC )
34 rsid.at_pid=RS_MYSELF;
36 else if ( *check_type == CHECK_THREAD )
40 rsid.at_tid=RS_MYSELF;
41 thread_num=omp_get_thread_num();
45 fprintf(stderr,
"ra_check: check_type $d not CHECK_PROC or CHECK_THREAD\n",*check_type);
53 rs=ra_getrset(rstype,rsid,0,rset);
55 perror(
"ra_check: ra_getrset error:");
57 }
else if ( rs==RS_EFFECTIVE_RSET ) {
58 if(*prnt==1) fprintf(stderr,
"pid: %d thread: %d tid: %d RSET type RS_EFFECTIVE_RSET\n",mypid,thread_num,mytid);
60 else if ( rs==RS_PARTITION_RSET ) {
61 if(*prnt==1) fprintf(stderr,
"pid: %d thread: %d tid: %d RSET type RS_PARTITION_RSET\n",mypid,thread_num,mytid);
63 else if ( rs==RS_DEFAULT_RSET ) {
64 if(*prnt==1) fprintf(stderr,
"pid: %d thread: %d tid: %d RSET type RS_DEFAULT_RSET\n",mypid,thread_num,mytid);
66 else if ( rs==RS_THREAD_RSET ) {
67 if(*prnt==1) fprintf(stderr,
"pid: %d thread: %d tid: %d RSET type RS_THREAD_RSET\n",mypid,thread_num,mytid);
69 else if ( rs==RS_THREAD_PARTITION_RSET ) {
70 if(*prnt==1) fprintf(stderr,
"pid: %d thread: %d tid: %d RSET type RS_THREAD_PARTITION_RSET\n",mypid,thread_num,mytid);
77 if ( rs == RS_DEFAULT_RSET ) {
78 if(*prnt==1) fprintf(stderr,
"ra_check: RS_DEFAULT_RSET returning 1\n");
81 if(*prnt==1) fprintf(stderr,
"ra_check: NOT RS_DEFAULT_RSET returning 0\n");
int ra_check(const int *check_type, int *prnt)