X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fshared%2Fpthreads_op.c;h=482fbe6b0c2fb75c74c23d888e773edd121ef578;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=0262110a3ea70ebde32f5a2a73aff4d289737389;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/shared/pthreads_op.c b/src/shared/pthreads_op.c old mode 100755 new mode 100644 index 0262110..482fbe6 --- a/src/shared/pthreads_op.c +++ b/src/shared/pthreads_op.c @@ -1,45 +1,38 @@ -/* @(#) $Id: pthreads_op.c,v 1.8 2009/06/24 18:53:08 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ - #ifndef WIN32 #include "shared.h" #include - -/* CreateThread(void v0.1 - * Creates a new thread and gives the argument passed to the function - * Return 0 on success or -1 on error +/* Create a new thread and give the argument passed to the function + * Returns 0 on success or -1 on error */ int CreateThread(void *function_pointer(void *data), void *data) { pthread_t lthread; int ret = 0; - ret = pthread_create(<hread, NULL, function_pointer, (void*)data); - if(ret != 0) - { + ret = pthread_create(<hread, NULL, function_pointer, (void *)data); + if (ret != 0) { merror(THREAD_ERROR, __local_name); return (-1); } - if(pthread_detach(lthread) != 0) - { + if (pthread_detach(lthread) != 0) { merror(THREAD_ERROR, __local_name); - return(-1); + return (-1); } - return(0); + return (0); } -#endif -/* EOF */ +#endif /* !WIN32 */ +