mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 20:17:59 +00:00
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.
This commit is contained in:
parent
6551004fb1
commit
4f10c1e65c
@ -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 *);
|
||||
|
||||
|
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user