summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-06-20 19:40:45 +0200
committerPatrick Steinhardt <ps@pks.im>2016-06-20 19:50:11 +0200
commit4f10c1e65c14a2c8b11577d2fd25b5c4f6912a85 (patch)
treeeb5cec9e5eb67051a9ced36506739f0504b6480a
parent6551004fb19453f424337b5b7a5fed6becb3b746 (diff)
downloadlibgit2-4f10c1e65c14a2c8b11577d2fd25b5c4f6912a85.tar.gz
threads: remove unused function pthread_num_processors_np
The function pthread_num_processors_np is currently unused and superseded by the function `git_online_cpus`. Remove the function.
-rw-r--r--src/win32/pthread.c11
-rw-r--r--src/win32/pthread.h2
2 files changed, 0 insertions, 13 deletions
diff --git a/src/win32/pthread.c b/src/win32/pthread.c
index 62a691dba..80329b2b0 100644
--- a/src/win32/pthread.c
+++ b/src/win32/pthread.c
@@ -152,17 +152,6 @@ int git_cond_signal(git_cond *cond)
return 0;
}
-int pthread_num_processors_np(void)
-{
- DWORD_PTR p, s;
- int n = 0;
-
- if (GetProcessAffinityMask(GetCurrentProcess(), &p, &s))
- for (; p; p >>= 1)
- n += p&1;
-
- return n ? n : 1;
-}
typedef void (WINAPI *win32_srwlock_fn)(GIT_SRWLOCK *);
diff --git a/src/win32/pthread.h b/src/win32/pthread.h
index ef9285500..821bb64ee 100644
--- a/src/win32/pthread.h
+++ b/src/win32/pthread.h
@@ -57,8 +57,6 @@ int git_cond_free(git_cond *);
int git_cond_wait(git_cond *, git_mutex *);
int git_cond_signal(git_cond *);
-int pthread_num_processors_np(void);
-
int git_rwlock_init(git_rwlock *GIT_RESTRICT lock);
int git_rwlock_rdlock(git_rwlock *);
int git_rwlock_rdunlock(git_rwlock *);