git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
bab9dc5e4d6be4c0a4553255657f05fa301b135f blob 1668 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 
#ifndef THREAD_COMPAT_H
#define THREAD_COMPAT_H

#ifndef NO_PTHREADS
#include <pthread.h>

#define HAVE_THREADS 1

#else

#define HAVE_THREADS 0

/*
 * macros instead of typedefs because pthread definitions may have
 * been pulled in by some system dependencies even though the user
 * wants to disable pthread.
 */
#define pthread_t int
#define pthread_mutex_t int
#define pthread_cond_t int
#define pthread_key_t int
#define pthread_once_t int

#define pthread_mutex_init(mutex, attr) dummy_pthread_init(mutex)
#define pthread_mutex_lock(mutex)
#define pthread_mutex_unlock(mutex)
#define pthread_mutex_destroy(mutex)

#define pthread_cond_init(cond, attr) dummy_pthread_init(cond)
#define pthread_cond_wait(cond, mutex)
#define pthread_cond_signal(cond)
#define pthread_cond_broadcast(cond)
#define pthread_cond_destroy(cond)

#define pthread_key_create(key, attr) dummy_pthread_init(key)
#define pthread_key_delete(key)

#define pthread_create(thread, attr, fn, data) \
	dummy_pthread_create(thread, attr, fn, data)
#define pthread_join(thread, retval) \
	dummy_pthread_join(thread, retval)

#define pthread_setspecific(key, data)
#define pthread_getspecific(key) NULL

int dummy_pthread_create(pthread_t *pthread, const void *attr,
			 void *(*fn)(void *), void *data);
int dummy_pthread_join(pthread_t pthread, void **retval);

int dummy_pthread_init(void *);

#define PTHREAD_ONCE_INIT 0
int nothreads_pthread_once(pthread_once_t *once_control,
			   void (*init_routine)(void));
#define pthread_once(once, routine) nothreads_pthread_once(once, routine)

#endif

int online_cpus(void);
int init_recursive_mutex(pthread_mutex_t*);


#endif /* THREAD_COMPAT_H */
debug log:

solving bab9dc5e4d ...
found bab9dc5e4d in https://public-inbox.org/git/e5a10d3f2152859b75bd815c37511975057d0ab0.1593115455.git.matheus.bernardino@usp.br/
found 4961487ed9 in git.git.git
preparing index
index prepared:
100644 4961487ed914f4fea817df26904109bb05f2a2c5	thread-utils.h

applying [1/1] https://public-inbox.org/git/e5a10d3f2152859b75bd815c37511975057d0ab0.1593115455.git.matheus.bernardino@usp.br/
diff --git a/thread-utils.h b/thread-utils.h
index 4961487ed9..bab9dc5e4d 100644

Checking patch thread-utils.h...
Applied patch thread-utils.h cleanly.

index at:
100644 bab9dc5e4d6be4c0a4553255657f05fa301b135f	thread-utils.h

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).