1 /* @(#) $Id: ./src/shared/pthreads_op.c, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
20 /* CreateThread(void v0.1
21 * Creates a new thread and gives the argument passed to the function
22 * Return 0 on success or -1 on error
24 int CreateThread(void *function_pointer(void *data), void *data)
29 ret = pthread_create(<hread, NULL, function_pointer, (void*)data);
32 merror(THREAD_ERROR, __local_name);
36 if(pthread_detach(lthread) != 0)
38 merror(THREAD_ERROR, __local_name);