整理格式.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2021-06-07 16:28:25 +08:00
parent 3832ea5e2e
commit 73848bd3d1
1 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ SYNOPSIS
* 同样 , 如果 pid 的值为 0.也表示的是当前进程 */
RETURN VALUE
On success, sched_setaffinity() and sched_getaffinity() return 0. On error, -1 is returned, and errno is set appropriately.
On success, sched_setaffinity() and sched_getaffinity() return 0. On error, -1 is returned, and errno is set appropriately.
```
设置 CPU Affinity 还需要用到一下宏函数
@ -137,11 +137,11 @@ syscall 是执行一个系统调用,根据指定的参数 number 和所有系
```cpp
//syscall - indirect system call
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
int syscall(int number, ...);
int syscall(int number, ...);
/* sysconf( _SC_PAGESIZE ); 此宏查看缓存内存页面的大小;打印用%ld 长整型。
sysconf( _SC_PHYS_PAGES ) 此宏查看内存的总页数;打印用%ld 长整型。