MONC
forthread_ciface.F90
Go to the documentation of this file.
2  ! pthread interfaces for fortran
3  ! these interfaces are used in the Fortran code.
4 
5  interface
6  subroutine thread_init(info) bind(c)
7  use iso_c_binding
8  integer(c_int), intent(out) :: info
9  end subroutine thread_init
10  end interface
11  interface
12  subroutine thread_destroy(info) bind(c)
13  use iso_c_binding
14  integer(c_int), intent(out) :: info
15  end subroutine thread_destroy
16  end interface
17 
18  abstract interface
19  function i_start_routine(arg) bind(c)
20  use iso_c_binding
21  type(c_ptr) :: i_start_routine
22  type(c_ptr), value, intent(in) :: arg
23  end function i_start_routine
24  end interface
25 
26  interface
27  subroutine thread_alloc(thread_id,info) bind(c)
28  use iso_c_binding
29  integer(c_int), intent(out) :: thread_id
30  integer(c_int), intent(out) :: info
31  end subroutine thread_alloc
32  end interface
33 
34  interface
35  subroutine thread_create(thread_id,attr_id,start_routine,arg,info) bind(c)
36  use iso_c_binding
37  integer(c_int), intent(in) :: thread_id
38  integer(c_int), intent(in) :: attr_id
39  type(c_funptr), intent(in) :: start_routine
40  type(c_ptr), value, intent(in) :: arg
41  integer(c_int), intent(out) :: info
42  end subroutine thread_create
43  end interface
44 
45  interface
46  subroutine thread_detach(thread_id,info) bind(c)
47  use iso_c_binding
48  integer(c_int), intent(in) :: thread_id
49  integer(c_int), intent(out) :: info
50  end subroutine thread_detach
51  end interface
52 
53  interface
54  subroutine thread_equal(t1,t2,info) bind(c)
55  use iso_c_binding
56  integer(c_int), intent(in) :: t1
57  integer(c_int), intent(in) :: t2
58  integer(c_int), intent(out) :: info
59  end subroutine thread_equal
60  end interface
61 
62  interface
63  subroutine thread_exit(value_ptr) bind(c)
64  use iso_c_binding
65  type(c_ptr), intent(in) :: value_ptr
66  end subroutine thread_exit
67  end interface
68 
69  interface
70  subroutine thread_join(thread_id,value_ptr,info) bind(c)
71  use iso_c_binding
72  integer(c_int), intent(in) :: thread_id
73  type(c_ptr), intent(out) :: value_ptr
74  integer(c_int), intent(out) :: info
75  end subroutine thread_join
76  end interface
77 
78  interface
79  subroutine thread_cancel(thread_id,info) bind(c)
80  use iso_c_binding
81  integer(c_int), intent(in) :: thread_id
82  integer(c_int), intent(out) :: info
83  end subroutine thread_cancel
84  end interface
85 
86  interface
87  subroutine thread_kill(thread_id,sig,info) bind(c)
88  use iso_c_binding
89  integer(c_int), intent(in) :: thread_id
90  integer(c_int), intent(in) :: sig
91  integer(c_int), intent(out) :: info
92  end subroutine thread_kill
93  end interface
94 
95  interface
96  subroutine thread_once_init(once_ctrl,info) bind(c)
97  use iso_c_binding
98  integer(c_int), intent(out) :: once_ctrl
99  integer(c_int), intent(out) :: info
100  end subroutine thread_once_init
101  end interface
102 
103  interface
104  subroutine thread_once(once_ctrl_id,routine,info) bind(c)
105  use iso_c_binding
106  integer(c_int), intent(in) :: once_ctrl_id
107  type(c_funptr), intent(in) :: routine
108  integer(c_int), intent(out) :: info
109  end subroutine thread_once
110  end interface
111 
112  interface
113  subroutine thread_atfork(prepare,parent,child,info) bind(c)
114  use iso_c_binding
115  type(c_funptr), intent(in) :: prepare
116  type(c_funptr), intent(in) :: parent
117  type(c_funptr), intent(in) :: child
118  integer(c_int), intent(out) :: info
119  end subroutine thread_atfork
120  end interface
121 
122  ! TODO implemented thread_cleanup_pop and thread_cleanup_push
123 
124  interface
125  subroutine thread_getconcurrency(currlevel,info) bind(c)
126  use iso_c_binding
127  integer(c_int), intent(out) :: currlevel
128  integer(c_int), intent(out) :: info
129  end subroutine thread_getconcurrency
130  end interface
131 
132  interface
133  subroutine thread_setconcurrency(newlevel,info) bind(c)
134  use iso_c_binding
135  integer(c_int), intent(in) :: newlevel
136  integer(c_int), intent(out) :: info
137  end subroutine thread_setconcurrency
138  end interface
139 
140 #ifndef __DARWIN
141  interface
142  subroutine thread_getcpuclockid(thread,clock_id,info) bind(c)
143  use iso_c_binding
144  integer(c_int), intent(in) :: thread
145  integer(c_int), intent(out) :: clock_id
146  integer(c_int), intent(out) :: info
147  end subroutine thread_getcpuclockid
148  end interface
149 #endif
150 
151 
152  interface
153  subroutine thread_getschedparam(thread,policy,param,info) bind(c)
154  use iso_c_binding
155  use forthread_types
156  integer(c_int), intent(in) :: thread
157  integer(c_int), intent(out) :: policy
158  type(sched_param), intent(out) :: param
159  integer(c_int), intent(out) :: info
160  end subroutine thread_getschedparam
161  end interface
162 
163  interface
164  subroutine thread_setschedparam(thread,policy,param,info) bind(c)
165  use iso_c_binding
166  use forthread_types
167  integer(c_int), intent(in) :: thread
168  integer(c_int), intent(in) :: policy
169  type(sched_param), intent(in) :: param
170  integer(c_int), intent(out) :: info
171  end subroutine thread_setschedparam
172  end interface
173 
174 #ifndef __DARWIN
175  interface
176  subroutine thread_setschedprio(thread,prio,info) bind(c)
177  use iso_c_binding
178  integer(c_int), intent(in) :: thread
179  integer(c_int), intent(in) :: prio
180  integer(c_int), intent(out) :: info
181  end subroutine thread_setschedprio
182  end interface
183 #endif
184 
185  interface
186  subroutine thread_setcancelstate(state,oldstate,info) bind(c)
187  use iso_c_binding
188  integer(c_int), intent(in) :: state
189  integer(c_int), intent(in) :: oldstate
190  integer(c_int), intent(out) :: info
191  end subroutine thread_setcancelstate
192  end interface
193 
194  interface
195  subroutine thread_setcanceltype(ctype,oldctype,info) bind(c)
196  use iso_c_binding
197  integer(c_int), intent(in) :: ctype
198  integer(c_int), intent(in) :: oldctype
199  integer(c_int), intent(out) :: info
200  end subroutine thread_setcanceltype
201  end interface
202 
203  !*****************************************!
204  !* sharing private data in threads *!
205  !*****************************************!
206 
207 
208  !void thread_key_delete(int *key_id, int *info);
209  interface
210  subroutine thread_key_delete(key_id,info) bind(c)
211  use iso_c_binding
212  integer(c_int), intent(in) :: key_id
213  integer(c_int), intent(out) :: info
214  end subroutine thread_key_delete
215  end interface
216 
217  !void thread_key_create(int *key_id,void (*destructor)(void *),int *info);
218  interface
219  subroutine thread_key_create(key_id,destructor,info) bind(c)
220  use iso_c_binding
221  integer(c_int), intent(out) :: key_id
222  type(c_funptr), intent(in) :: destructor
223  integer(c_int), intent(out) :: info
224  end subroutine thread_key_create
225  end interface
226 
227  !void thread_getspecific(int *key, void **value, int *info);
228  interface
229  subroutine thread_getspecific(key,val,info) bind(c)
230  use iso_c_binding
231  integer(c_int), intent(in) :: key
232  type(c_ptr), intent(out) :: val
233  integer(c_int), intent(out) :: info
234  end subroutine thread_getspecific
235  end interface
236 
237  !void thread_setspecific(int *key, void **value, int *info);
238  interface
239  subroutine thread_setspecific(key,val,info) bind(c)
240  use iso_c_binding
241  integer(c_int), intent(in) :: key
242  type(c_ptr), intent(in) :: val
243  integer(c_int), intent(out) :: info
244  end subroutine thread_setspecific
245  end interface
246 
247  !*****************************************!
248  !* mutex routines *!
249  !*****************************************!
250 
251  interface
252  subroutine thread_mutex_destroy(mutex_id,info) bind(c)
253  use iso_c_binding
254  integer(c_int), intent(in) :: mutex_id
255  integer(c_int), intent(out) :: info
256  end subroutine thread_mutex_destroy
257  end interface
258 
259  interface
260  subroutine thread_mutex_init(mutex_id,attr_id,info) bind(c)
261  use iso_c_binding
262  integer(c_int), intent(out) :: mutex_id
263  integer(c_int), intent(in) :: attr_id
264  integer(c_int), intent(out) :: info
265  end subroutine thread_mutex_init
266  end interface
267 
268  interface
269  subroutine thread_mutex_lock(mutex_id,info) bind(c)
270  use iso_c_binding
271  integer(c_int), intent(in) :: mutex_id
272  integer(c_int), intent(out) :: info
273  end subroutine thread_mutex_lock
274  end interface
275 
276  interface
277  subroutine thread_mutex_trylock(mutex_id,info) bind(c)
278  use iso_c_binding
279  integer(c_int), intent(in) :: mutex_id
280  integer(c_int), intent(out) :: info
281  end subroutine thread_mutex_trylock
282  end interface
283 
284  interface
285  subroutine thread_mutex_unlock(mutex_id,info) bind(c)
286  use iso_c_binding
287  integer(c_int), intent(in) :: mutex_id
288  integer(c_int), intent(out) :: info
289  end subroutine thread_mutex_unlock
290  end interface
291 
292  interface
293  subroutine thread_mutex_getprioceiling(mutex,prioceiling,info) bind(c)
294  use iso_c_binding
295  integer(c_int), intent(in) :: mutex
296  integer(c_int), intent(out) :: prioceiling
297  integer(c_int), intent(out) :: info
298  end subroutine thread_mutex_getprioceiling
299  end interface
300 
301  interface
302  subroutine thread_mutex_setprioceiling(mutex,prioceiling,old_ceiling,info) bind(c)
303  use iso_c_binding
304  integer(c_int), intent(in) :: mutex
305  integer(c_int), intent(in) :: prioceiling
306  integer(c_int), intent(out) :: old_ceiling
307  integer(c_int), intent(out) :: info
308  end subroutine thread_mutex_setprioceiling
309  end interface
310 
311 #ifndef __DARWIN
312  interface
313  subroutine thread_mutex_timedlock(mutex,abs_timeout,info) bind(c)
314  use iso_c_binding
315  use forthread_types
316  integer(c_int), intent(in) :: mutex
317  type(timespec), intent(in) :: abs_timeout
318  integer(c_int), intent(out) :: info
319  end subroutine thread_mutex_timedlock
320  end interface
321 #endif
322 
323  !*****************************************!
324  !* condition variable routines *!
325  !*****************************************!
326 
327  interface
328  subroutine thread_cond_destroy(cond_id,info) bind(c)
329  use iso_c_binding
330  integer(c_int), intent(in) :: cond_id
331  integer(c_int), intent(out) :: info
332  end subroutine thread_cond_destroy
333  end interface
334 
335  interface
336  subroutine thread_cond_init(cond_id,attr_id,info) bind(c)
337  use iso_c_binding
338  integer(c_int), intent(out) :: cond_id
339  integer(c_int), intent(in) :: attr_id
340  integer(c_int), intent(out) :: info
341  end subroutine thread_cond_init
342  end interface
343 
344  interface
345  subroutine thread_cond_timedwait(mutex,abstime,info) bind(c)
346  use iso_c_binding
347  use forthread_types
348  integer(c_int), intent(in) :: mutex
349  type(timespec), intent(in) :: abstime
350  integer(c_int), intent(out) :: info
351  end subroutine thread_cond_timedwait
352  end interface
353 
354  interface
355  subroutine thread_cond_wait(cond_id,mutex_id,info) bind(c)
356  use iso_c_binding
357  integer(c_int), intent(in) :: cond_id
358  integer(c_int), intent(in) :: mutex_id
359  integer(c_int), intent(out) :: info
360  end subroutine thread_cond_wait
361  end interface
362 
363  interface
364  subroutine thread_cond_broadcast(cond_id,info) bind(c)
365  use iso_c_binding
366  integer(c_int), intent(in) :: cond_id
367  integer(c_int), intent(out) :: info
368  end subroutine thread_cond_broadcast
369  end interface
370 
371  interface
372  subroutine thread_cond_signal(cond_id,info) bind(c)
373  use iso_c_binding
374  integer(c_int), intent(in) :: cond_id
375  integer(c_int), intent(out) :: info
376  end subroutine thread_cond_signal
377  end interface
378 
379 #ifndef __DARWIN
380  !****************************************!
381  !* barrier variable routines *!
382  !****************************************!
383 
384  interface
385  subroutine thread_barrier_destroy(barrier_id,info) bind(c)
386  use iso_c_binding
387  integer(c_int), intent(in) :: barrier_id
388  integer(c_int), intent(out) :: info
389  end subroutine thread_barrier_destroy
390  end interface
391 
392  interface
393  subroutine thread_barrier_init(barrier_id,attr_id,tcount,info) bind(c)
394  use iso_c_binding
395  integer(c_int), intent(out) :: barrier_id
396  integer(c_int), intent(in) :: attr_id
397  integer(c_int), intent(in) :: tcount
398  integer(c_int), intent(out) :: info
399  end subroutine thread_barrier_init
400  end interface
401 
402  interface
403  subroutine thread_barrier_wait(barrier_id,info) bind(c)
404  use iso_c_binding
405  integer(c_int), intent(in) :: barrier_id
406  integer(c_int), intent(out) :: info
407  end subroutine thread_barrier_wait
408  end interface
409 
410  !*************************************!
411  !* spin variable routines *!
412  !*************************************!
413 
414  interface
415  subroutine thread_spin_destroy(spinlock_id,info) bind(c)
416  use iso_c_binding
417  integer(c_int), intent(in) :: spinlock_id
418  integer(c_int), intent(out) :: info
419  end subroutine thread_spin_destroy
420  end interface
421 
422  interface
423  subroutine thread_spin_init(spinlock_id,pshared,info) bind(c)
424  use iso_c_binding
425  integer(c_int), intent(out) :: spinlock_id
426  integer(c_int), intent(in) :: pshared
427  integer(c_int), intent(out) :: info
428  end subroutine thread_spin_init
429  end interface
430 
431  interface
432  subroutine thread_spin_lock(lock_id,info) bind(c)
433  use iso_c_binding
434  integer(c_int), intent(in) :: lock_id
435  integer(c_int), intent(out) :: info
436  end subroutine thread_spin_lock
437  end interface
438 
439  interface
440  subroutine thread_spin_trylock(lock_id,info) bind(c)
441  use iso_c_binding
442  integer(c_int), intent(in) :: lock_id
443  integer(c_int), intent(out) :: info
444  end subroutine thread_spin_trylock
445  end interface
446 
447  interface
448  subroutine thread_spin_unlock(lock_id,info) bind(c)
449  use iso_c_binding
450  integer(c_int), intent(in) :: lock_id
451  integer(c_int), intent(out) :: info
452  end subroutine thread_spin_unlock
453  end interface
454 #endif
455 
456  !*************************************!
457  !* rwlock variable routines *!
458  !*************************************!
459 
460  interface
461  subroutine thread_rwlock_destroy(rwlock_id,info) bind(c)
462  use iso_c_binding
463  integer(c_int), intent(in) :: rwlock_id
464  integer(c_int), intent(out) :: info
465  end subroutine thread_rwlock_destroy
466  end interface
467 
468  interface
469  subroutine thread_rwlock_init(rwlock_id,attr_id,info) bind(c)
470  use iso_c_binding
471  integer(c_int), intent(out) :: rwlock_id
472  integer(c_int), intent(in) :: attr_id
473  integer(c_int), intent(out) :: info
474  end subroutine thread_rwlock_init
475  end interface
476 
477  interface
478  subroutine thread_rwlock_rdlock(lock_id,info) bind(c)
479  use iso_c_binding
480  integer(c_int), intent(in) :: lock_id
481  integer(c_int), intent(out) :: info
482  end subroutine thread_rwlock_rdlock
483  end interface
484 
485  interface
486  subroutine thread_rwlock_tryrdlock(lock_id,info) bind(c)
487  use iso_c_binding
488  integer(c_int), intent(in) :: lock_id
489  integer(c_int), intent(out) :: info
490  end subroutine thread_rwlock_tryrdlock
491  end interface
492 
493  interface
494  subroutine thread_rwlock_wrlock(lock_id,info) bind(c)
495  use iso_c_binding
496  integer(c_int), intent(in) :: lock_id
497  integer(c_int), intent(out) :: info
498  end subroutine thread_rwlock_wrlock
499  end interface
500 
501  interface
502  subroutine thread_rwlock_trywrlock(lock_id,info) bind(c)
503  use iso_c_binding
504  integer(c_int), intent(in) :: lock_id
505  integer(c_int), intent(out) :: info
506  end subroutine thread_rwlock_trywrlock
507  end interface
508 
509  interface
510  subroutine thread_rwlock_unlock(lock_id,info) bind(c)
511  use iso_c_binding
512  integer(c_int), intent(in) :: lock_id
513  integer(c_int), intent(out) :: info
514  end subroutine thread_rwlock_unlock
515  end interface
516 
517 #ifndef __DARWIN
518  interface
519  subroutine thread_rwlock_timedrdlock(lock_id,abs_timeout,info) bind(c)
521  use iso_c_binding
522  integer(c_int), intent(in) :: lock_id
523  type(timespec), intent(in) :: abs_timeout
524  integer(c_int), intent(out) :: info
525  end subroutine thread_rwlock_timedrdlock
526  end interface
527 
528  interface
529  subroutine thread_rwlock_timedwrlock(lock_id,abs_timeout,info) bind(c)
531  use iso_c_binding
532  integer(c_int), intent(in) :: lock_id
533  type(timespec), intent(in) :: abs_timeout
534  integer(c_int), intent(out) :: info
535  end subroutine thread_rwlock_timedwrlock
536  end interface
537 #endif
538 
539 
540 
541  !*****************************************!
542  !* attribute object routines *!
543  !*****************************************!
544 
545  interface
546  subroutine thread_attr_destroy(attr,info) bind(c)
547  use iso_c_binding
548  integer(c_int), intent(in) :: attr
549  integer(c_int), intent(out) :: info
550  end subroutine thread_attr_destroy
551  end interface
552 
553  interface
554  subroutine thread_attr_init(attr,info) bind(c)
555  use iso_c_binding
556  integer(c_int), intent(in) :: attr
557  integer(c_int), intent(out) :: info
558  end subroutine thread_attr_init
559  end interface
560 
561  interface
562  subroutine thread_attr_getdetachstate(attr,detachstate,info) bind(c)
563  use iso_c_binding
564  integer(c_int), intent(in) :: attr
565  integer(c_int), intent(out) :: detachstate
566  integer(c_int), intent(out) :: info
567  end subroutine thread_attr_getdetachstate
568  end interface
569 
570  interface
571  subroutine thread_attr_setdetachstate(attr,detachstate,info) bind(c)
572  use iso_c_binding
573  integer(c_int), intent(in) :: attr
574  integer(c_int), intent(in) :: detachstate
575  integer(c_int), intent(out) :: info
576  end subroutine thread_attr_setdetachstate
577  end interface
578 
579  interface
580  subroutine thread_attr_getguardsize(attr,guardsize,info) bind(c)
581  use iso_c_binding
582  integer(c_int), intent(in) :: attr
583  integer(c_size_t), intent(out) :: guardsize
584  integer(c_int), intent(out) :: info
585  end subroutine thread_attr_getguardsize
586  end interface
587 
588  interface
589  subroutine thread_attr_setguardsize(attr,guardsize,info) bind(c)
590  use iso_c_binding
591  integer(c_int), intent(in) :: attr
592  integer(c_size_t), intent(in) :: guardsize
593  integer(c_int), intent(out) :: info
594  end subroutine thread_attr_setguardsize
595  end interface
596 
597  interface
598  subroutine thread_attr_getinheritsched(attr,inheritsched,info) bind(c)
599  use iso_c_binding
600  integer(c_int), intent(in) :: attr
601  integer(c_int), intent(out) :: inheritsched
602  integer(c_int), intent(out) :: info
603  end subroutine thread_attr_getinheritsched
604  end interface
605 
606  interface
607  subroutine thread_attr_setinheritsched(attr,inheritsched,info) bind(c)
608  use iso_c_binding
609  integer(c_int), intent(in) :: attr
610  integer(c_int), intent(in) :: inheritsched
611  integer(c_int), intent(out) :: info
612  end subroutine thread_attr_setinheritsched
613  end interface
614 
615  interface
616  subroutine thread_attr_getschedparam(attr,param,info) bind(c)
617  use iso_c_binding
618  use forthread_types
619  integer(c_int), intent(in) :: attr
620  type(sched_param), intent(out) :: param
621  integer(c_int), intent(out) :: info
622  end subroutine thread_attr_getschedparam
623  end interface
624 
625  interface
626  subroutine thread_attr_setschedparam(attr,param,info) bind(c)
627  use iso_c_binding
628  use forthread_types
629  integer(c_int), intent(in) :: attr
630  type(sched_param), intent(in) :: param
631  integer(c_int), intent(out) :: info
632  end subroutine thread_attr_setschedparam
633  end interface
634 
635  interface
636  subroutine thread_attr_getschedpolicy(attr,policy,info) bind(c)
637  use iso_c_binding
638  integer(c_int), intent(in) :: attr
639  integer(c_int), intent(out) :: policy
640  integer(c_int), intent(out) :: info
641  end subroutine thread_attr_getschedpolicy
642  end interface
643 
644  interface
645  subroutine thread_attr_setschedpolicy(attr,policy,info) bind(c)
646  use iso_c_binding
647  integer(c_int), intent(in) :: attr
648  integer(c_int), intent(in) :: policy
649  integer(c_int), intent(out) :: info
650  end subroutine thread_attr_setschedpolicy
651  end interface
652 
653  interface
654  subroutine thread_attr_getscope(attr,scope,info) bind(c)
655  use iso_c_binding
656  integer(c_int), intent(in) :: attr
657  integer(c_int), intent(out) :: scope
658  integer(c_int), intent(out) :: info
659  end subroutine thread_attr_getscope
660  end interface
661 
662  interface
663  subroutine thread_attr_setscope(attr,scope,info) bind(c)
664  use iso_c_binding
665  integer(c_int), intent(in) :: attr
666  integer(c_int), intent(in) :: scope
667  integer(c_int), intent(out) :: info
668  end subroutine thread_attr_setscope
669  end interface
670 
671  interface
672  subroutine thread_attr_getstacksize(attr,stacksize,info) bind(c)
673  use iso_c_binding
674  integer(c_int), intent(in) :: attr
675  integer(c_size_t), intent(out) :: stacksize
676  integer(c_int), intent(out) :: info
677  end subroutine thread_attr_getstacksize
678  end interface
679 
680  interface
681  subroutine thread_attr_setstacksize(attr,stacksize,info) bind(c)
682  use iso_c_binding
683  integer(c_int), intent(in) :: attr
684  integer(c_size_t), intent(in) :: stacksize
685  integer(c_int), intent(out) :: info
686  end subroutine thread_attr_setstacksize
687  end interface
688 
689  !*****************************************!
690  !* mutex attribute routines *!
691  !*****************************************!
692 
693  interface
694  subroutine thread_mutexattr_destroy(attr,info) bind(c)
695  use iso_c_binding
696  integer(c_int), intent(in) :: attr
697  integer(c_int), intent(out) :: info
698  end subroutine thread_mutexattr_destroy
699  end interface
700 
701  interface
702  subroutine thread_mutexattr_init(attr,info) bind(c)
703  use iso_c_binding
704  integer(c_int), intent(in) :: attr
705  integer(c_int), intent(out) :: info
706  end subroutine thread_mutexattr_init
707  end interface
708 
709  interface
710  subroutine thread_mutexattr_getpshared(attr,pshared,info) bind(c)
711  use iso_c_binding
712  integer(c_int), intent(in) :: attr
713  integer(c_int), intent(out) :: pshared
714  integer(c_int), intent(out) :: info
715  end subroutine thread_mutexattr_getpshared
716  end interface
717 
718  interface
719  subroutine thread_mutexattr_setpshared(attr,pshared,info) bind(c)
720  use iso_c_binding
721  integer(c_int), intent(in) :: attr
722  integer(c_int), intent(in) :: pshared
723  integer(c_int), intent(out) :: info
724  end subroutine thread_mutexattr_setpshared
725  end interface
726 
727  interface
728  subroutine thread_mutexattr_getprioceiling(attr,prioceiling,info) bind(c)
729  use iso_c_binding
730  integer(c_int), intent(in) :: attr
731  integer(c_int), intent(out) :: prioceiling
732  integer(c_int), intent(out) :: info
733  end subroutine thread_mutexattr_getprioceiling
734  end interface
735 
736  interface
737  subroutine thread_mutexattr_setprioceiling(attr,prioceiling,info) bind(c)
738  use iso_c_binding
739  integer(c_int), intent(in) :: attr
740  integer(c_int), intent(in) :: prioceiling
741  integer(c_int), intent(out) :: info
742  end subroutine thread_mutexattr_setprioceiling
743  end interface
744 
745  interface
746  subroutine thread_mutexattr_getprotocol(attr,protocol,info) bind(c)
747  use iso_c_binding
748  integer(c_int), intent(in) :: attr
749  integer(c_int), intent(out) :: protocol
750  integer(c_int), intent(out) :: info
751  end subroutine thread_mutexattr_getprotocol
752  end interface
753 
754  interface
755  subroutine thread_mutexattr_setprotocol(attr,protocol,info) bind(c)
756  use iso_c_binding
757  integer(c_int), intent(in) :: attr
758  integer(c_int), intent(in) :: protocol
759  integer(c_int), intent(out) :: info
760  end subroutine thread_mutexattr_setprotocol
761  end interface
762 
763  interface
764  subroutine thread_mutexattr_gettype(attr,mtype,info) bind(c)
765  use iso_c_binding
766  integer(c_int), intent(in) :: attr
767  integer(c_int), intent(out) :: mtype
768  integer(c_int), intent(out) :: info
769  end subroutine thread_mutexattr_gettype
770  end interface
771 
772  interface
773  subroutine thread_mutexattr_settype(attr,mtype,info) bind(c)
774  use iso_c_binding
775  integer(c_int), intent(in) :: attr
776  integer(c_int), intent(in) :: mtype
777  integer(c_int), intent(out) :: info
778  end subroutine thread_mutexattr_settype
779  end interface
780 
781  !*****************************************************!
782  !* condition attriubute variable routines *!
783  !*****************************************************!
784  interface
785  subroutine thread_condattr_destroy(attr,info) bind(c)
786  use iso_c_binding
787  integer(c_int), intent(in) :: attr
788  integer(c_int), intent(out) :: info
789  end subroutine thread_condattr_destroy
790  end interface
791 
792  interface
793  subroutine thread_condattr_init(attr,info) bind(c)
794  use iso_c_binding
795  integer(c_int), intent(in) :: attr
796  integer(c_int), intent(out) :: info
797  end subroutine thread_condattr_init
798  end interface
799 
800  interface
801  subroutine thread_condattr_getpshared(attr,pshared,info) bind(c)
802  use iso_c_binding
803  integer(c_int), intent(in) :: attr
804  integer(c_int), intent(out) :: pshared
805  integer(c_int), intent(out) :: info
806  end subroutine thread_condattr_getpshared
807  end interface
808 
809  interface
810  subroutine thread_condattr_setpshared(attr,pshared,info) bind(c)
811  use iso_c_binding
812  integer(c_int), intent(in) :: attr
813  integer(c_int), intent(in) :: pshared
814  integer(c_int), intent(out) :: info
815  end subroutine thread_condattr_setpshared
816  end interface
817 
818 #ifndef __DARWIN
819  interface
820  subroutine thread_condattr_getclock(attr,clock_id,info) bind(c)
821  use iso_c_binding
822  integer(c_int), intent(in) :: attr
823  integer(c_int), intent(out) :: clock_id
824  integer(c_int), intent(out) :: info
825  end subroutine thread_condattr_getclock
826  end interface
827 
828  interface
829  subroutine thread_condattr_setclock(attr,clock_id,info) bind(c)
830  use iso_c_binding
831  integer(c_int), intent(in) :: attr
832  integer(c_int), intent(in) :: clock_id
833  integer(c_int), intent(out) :: info
834  end subroutine thread_condattr_setclock
835  end interface
836 
837  !**************************************************!
838  !* barrier attribute variable routines *!
839  !**************************************************!
840  interface
841  subroutine thread_barrierattr_destroy(attr,info) bind(c)
842  use iso_c_binding
843  integer(c_int), intent(in) :: attr
844  integer(c_int), intent(out) :: info
845  end subroutine thread_barrierattr_destroy
846  end interface
847 
848  interface
849  subroutine thread_barrierattr_init(attr,info) bind(c)
850  use iso_c_binding
851  integer(c_int), intent(in) :: attr
852  integer(c_int), intent(out) :: info
853  end subroutine thread_barrierattr_init
854  end interface
855 
856  interface
857  subroutine thread_barrierattr_getpshared(attr,pshared,info) bind(c)
858  use iso_c_binding
859  integer(c_int), intent(in) :: attr
860  integer(c_int), intent(out) :: pshared
861  integer(c_int), intent(out) :: info
862  end subroutine thread_barrierattr_getpshared
863  end interface
864 
865  interface
866  subroutine thread_barrierattr_setpshared(attr,pshared,info) bind(c)
867  use iso_c_binding
868  integer(c_int), intent(in) :: attr
869  integer(c_int), intent(in) :: pshared
870  integer(c_int), intent(out) :: info
871  end subroutine thread_barrierattr_setpshared
872  end interface
873 #endif
874 
875  !**************************************************!
876  !* rwlock attribute variable routines *!
877  !**************************************************!
878 
879  interface
880  subroutine thread_rwlockattr_destroy(attr,info) bind(c)
881  use iso_c_binding
882  integer(c_int), intent(in) :: attr
883  integer(c_int), intent(out) :: info
884  end subroutine thread_rwlockattr_destroy
885  end interface
886 
887  interface
888  subroutine thread_rwlockattr_init(attr,info) bind(c)
889  use iso_c_binding
890  integer(c_int), intent(in) :: attr
891  integer(c_int), intent(out) :: info
892  end subroutine thread_rwlockattr_init
893  end interface
894 
895  interface
896  subroutine thread_rwlockattr_getpshared(attr,pshared,info) bind(c)
897  use iso_c_binding
898  integer(c_int), intent(in) :: attr
899  integer(c_int), intent(out) :: pshared
900  integer(c_int), intent(out) :: info
901  end subroutine thread_rwlockattr_getpshared
902  end interface
903 
904  interface
905  subroutine thread_rwlockattr_setpshared(attr,pshared,info) bind(c)
906  use iso_c_binding
907  integer(c_int), intent(in) :: attr
908  integer(c_int), intent(in) :: pshared
909  integer(c_int), intent(out) :: info
910  end subroutine thread_rwlockattr_setpshared
911  end interface
912 end module forthread_ciface_mod
913