123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /** **************************************************************************
- * pthread.h
- *
- * Copyright 2008 Bryan Ischo <[email protected]>
- *
- * This file is part of libs3.
- *
- * libs3 is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, version 3 or above of the License. You can also
- * redistribute and/or modify it under the terms of the GNU General Public
- * License, version 2 or above of the License.
- *
- * In addition, as a special exception, the copyright holders give
- * permission to link the code of this library and its programs with the
- * OpenSSL library, and distribute linked combinations including the two.
- *
- * libs3 is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with libs3, in a file named COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * You should also have received a copy of the GNU General Public License
- * version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- ************************************************************************** **/
- #ifndef PTHREAD_H
- #define PTHREAD_H
- // This is a minimal implementation of pthreads on Windows, implementing just
- // the APIs needed by libs3
- unsigned long pthread_self();
- typedef struct
- {
- CRITICAL_SECTION criticalSection;
- } pthread_mutex_t;
- int pthread_mutex_init(pthread_mutex_t *mutex, void *);
- int pthread_mutex_lock(pthread_mutex_t *mutex);
- int pthread_mutex_unlock(pthread_mutex_t *mutex);
- int pthread_mutex_destroy(pthread_mutex_t *mutex);
- #endif /* PTHREAD_H */
|