1 /* Thread compatibility glue
2 * Copyright (C) 2009 Howard Chu
4 * This Program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This Program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with RTMPDump; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
23 #include "librtmp/log.h"
30 ThreadCreate(thrfunc
*routine
, void *args
)
34 thd
= (HANDLE
) _beginthread(routine
, 0, args
);
36 RTMP_LogPrintf("%s, _beginthread failed with %d\n", __FUNCTION__
, errno
);
42 ThreadCreate(thrfunc
*routine
, void *args
)
45 pthread_attr_t attributes
;
48 pthread_attr_init(&attributes
);
49 pthread_attr_setdetachstate(&attributes
, PTHREAD_CREATE_DETACHED
);
52 pthread_create(&id
, &attributes
, routine
, args
);
54 RTMP_LogPrintf("%s, pthread_create failed with %d\n", __FUNCTION__
, ret
);