mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 17:52:27 +00:00
Make some improvements of little consequence
This commit is contained in:
parent
690d3df66e
commit
18a620cc1a
11 changed files with 92 additions and 14 deletions
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/sched-sysv.internal.h"
|
||||
#include "libc/calls/struct/cpuset.h"
|
||||
#include "libc/calls/syscall_support-nt.internal.h"
|
||||
|
@ -54,6 +55,8 @@ errno_t pthread_setaffinity_np(pthread_t thread, size_t size,
|
|||
int e, rc, tid;
|
||||
cpu_set_t bs = {0};
|
||||
struct PosixThread *pt;
|
||||
unassert(thread);
|
||||
unassert(bitset);
|
||||
e = errno;
|
||||
if (size < sizeof(cpu_set_t)) {
|
||||
memcpy(&bs, bitset, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue