Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4d47ad6f
Unverified
Commit
4d47ad6f
authored
2 years ago
by
Edward Thomson
Committed by
GitHub
2 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6432 from libgit2/ethomson/noop_args
thread: avoid warnings when building without threads
parents
d3f554fd
48850882
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
src/util/thread.h
+19
-18
src/util/util.h
+1
-0
No files found.
src/util/thread.h
View file @
4d47ad6f
...
@@ -263,33 +263,34 @@ GIT_INLINE(int64_t) git_atomic64_get(git_atomic64 *a)
...
@@ -263,33 +263,34 @@ GIT_INLINE(int64_t) git_atomic64_get(git_atomic64 *a)
#define git_threads_global_init git__noop
#define git_threads_global_init git__noop
#define git_thread unsigned int
#define git_thread unsigned int
#define git_thread_create(t
hread, start_routine, arg) git__noop(
)
#define git_thread_create(t
, s, a) git__noop(t, s, a
)
#define git_thread_join(i
d, status) git__noop(
)
#define git_thread_join(i
, s) git__noop_args(i, s
)
/* Pthreads Mutex */
/* Pthreads Mutex */
#define git_mutex unsigned int
#define git_mutex unsigned int
#define git_mutex_init(a) git__noop
(
)
#define git_mutex_init(a) git__noop
_args(a
)
#define git_mutex_init(a) git__noop
(
)
#define git_mutex_init(a) git__noop
_args(a
)
#define git_mutex_lock(a) git__noop
(
)
#define git_mutex_lock(a) git__noop
_args(a
)
#define git_mutex_unlock(a) git__noop
(
)
#define git_mutex_unlock(a) git__noop
_args(a
)
#define git_mutex_free(a) git__noop
(
)
#define git_mutex_free(a) git__noop
_args(a
)
/* Pthreads condition vars */
/* Pthreads condition vars */
#define git_cond unsigned int
#define git_cond unsigned int
#define git_cond_init(c) git__noop
(
)
#define git_cond_init(c) git__noop
_args(c
)
#define git_cond_free(c) git__noop
(
)
#define git_cond_free(c) git__noop
_args(c
)
#define git_cond_wait(c, l) git__noop
(
)
#define git_cond_wait(c, l) git__noop
_args(c, l
)
#define git_cond_signal(c) git__noop
(
)
#define git_cond_signal(c) git__noop
_args(c
)
#define git_cond_broadcast(c) git__noop
(
)
#define git_cond_broadcast(c) git__noop
_args(c
)
/* Pthreads rwlock */
/* Pthreads rwlock */
#define git_rwlock unsigned int
#define git_rwlock unsigned int
#define git_rwlock_init(a) git__noop()
#define git_rwlock_init(a) git__noop_args(a)
#define git_rwlock_rdlock(a) git__noop()
#define git_rwlock_rdlock(a) git__noop_args(a)
#define git_rwlock_rdunlock(a) git__noop()
#define git_rwlock_rdunlock(a) git__noop_args(a)
#define git_rwlock_wrlock(a) git__noop()
#define git_rwlock_wrlock(a) git__noop_args(a)
#define git_rwlock_wrunlock(a) git__noop()
#define git_rwlock_wrunlock(a) git__noop_args(a)
#define git_rwlock_free(a) git__noop()
#define git_rwlock_free(a) git__noop_args(a)
#define GIT_RWLOCK_STATIC_INIT 0
#define GIT_RWLOCK_STATIC_INIT 0
...
...
This diff is collapsed.
Click to expand it.
src/util/util.h
View file @
4d47ad6f
...
@@ -381,6 +381,7 @@ extern int git__getenv(git_str *out, const char *name);
...
@@ -381,6 +381,7 @@ extern int git__getenv(git_str *out, const char *name);
extern
int
git__online_cpus
(
void
);
extern
int
git__online_cpus
(
void
);
GIT_INLINE
(
int
)
git__noop
(
void
)
{
return
0
;
}
GIT_INLINE
(
int
)
git__noop
(
void
)
{
return
0
;
}
GIT_INLINE
(
int
)
git__noop_args
(
void
*
a
,
...)
{
GIT_UNUSED
(
a
);
return
0
;
}
#include "alloc.h"
#include "alloc.h"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment