mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
fix sizeof error
This commit is contained in:
parent
aca7408f66
commit
15b2ed2a97
|
@ -948,11 +948,11 @@ void u_bind2cpu(cpu_set_t* cpuset, pid_t pid, int n)
|
|||
#if !defined(U_SERVER_CAPTIVE_PORTAL) && defined(HAVE_SCHED_GETAFFINITY)
|
||||
CPU_SET(n, cpuset);
|
||||
|
||||
(void) sched_setaffinity(pid, sizeof(cpuset), cpuset);
|
||||
(void) sched_setaffinity(pid, sizeof(cpu_set_t), cpuset);
|
||||
|
||||
CPU_ZERO(cpuset);
|
||||
|
||||
(void) sched_getaffinity(pid, sizeof(cpuset), cpuset);
|
||||
(void) sched_getaffinity(pid, sizeof(cpu_set_t), cpuset);
|
||||
|
||||
U_INTERNAL_PRINT("cpuset = %ld", CPUSET_BITS(cpuset)[0])
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user