Skip to content

Commit 4f10c1e

Browse files
committed
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.
1 parent 6551004 commit 4f10c1e

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/win32/pthread.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ int git_cond_signal(git_cond *cond)
152152
return 0;
153153
}
154154

155-
int pthread_num_processors_np(void)
156-
{
157-
DWORD_PTR p, s;
158-
int n = 0;
159-
160-
if (GetProcessAffinityMask(GetCurrentProcess(), &p, &s))
161-
for (; p; p >>= 1)
162-
n += p&1;
163-
164-
return n ? n : 1;
165-
}
166155

167156
typedef void (WINAPI *win32_srwlock_fn)(GIT_SRWLOCK *);
168157

src/win32/pthread.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ int git_cond_free(git_cond *);
5757
int git_cond_wait(git_cond *, git_mutex *);
5858
int git_cond_signal(git_cond *);
5959

60-
int pthread_num_processors_np(void);
61-
6260
int git_rwlock_init(git_rwlock *GIT_RESTRICT lock);
6361
int git_rwlock_rdlock(git_rwlock *);
6462
int git_rwlock_rdunlock(git_rwlock *);

0 commit comments

Comments
 (0)