source: asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/thread/pthread_cleanup_push.c@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向けASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 511 bytes
Line 
1#include "pthread_impl.h"
2
3#ifndef __c2__
4static void dummy(struct __ptcb *cb)
5{
6}
7weak_alias(dummy, __do_cleanup_push);
8weak_alias(dummy, __do_cleanup_pop);
9#else
10extern void __do_cleanup_push(struct __ptcb *cb);
11extern void __do_cleanup_pop(struct __ptcb *cb);
12#endif
13
14void _pthread_cleanup_push(struct __ptcb *cb, void (*f)(void *), void *x)
15{
16 cb->__f = f;
17 cb->__x = x;
18 __do_cleanup_push(cb);
19}
20
21void _pthread_cleanup_pop(struct __ptcb *cb, int run)
22{
23 __do_cleanup_pop(cb);
24 if (run) cb->__f(cb->__x);
25}
Note: See TracBrowser for help on using the repository browser.