1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
15 /* Create a new thread and give the argument passed to the function
16 * Returns 0 on success or -1 on error
18 int CreateThread(void *function_pointer(void *data), void *data)
23 ret = pthread_create(<hread, NULL, function_pointer, (void *)data);
25 merror(THREAD_ERROR, __local_name);
29 if (pthread_detach(lthread) != 0) {
30 merror(THREAD_ERROR, __local_name);