1 /* @(#) $Id: pthreads_op.c,v 1.8 2009/06/24 18:53:08 dcid Exp $ */
3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 3) as published by the FSF - Free Software
19 /* CreateThread(void v0.1
20 * Creates a new thread and gives the argument passed to the function
21 * Return 0 on success or -1 on error
23 int CreateThread(void *function_pointer(void *data), void *data)
28 ret = pthread_create(<hread, NULL, function_pointer, (void*)data);
31 merror(THREAD_ERROR, __local_name);
35 if(pthread_detach(lthread) != 0)
37 merror(THREAD_ERROR, __local_name);