Xistor's Notes
  • Home
  • Archives
  • Tags
  • Categories
Xistor's Notes
  • Home
  • Archives
  • Tags
  • Categories

Linux/Unix系统编程手册-笔记8.进程信任状态

2020-07-28
Linux系统编程手册阅读
每个进程有一组相关的UID和GID: 真实用户ID(real user ID)和组ID 有效用户ID(effective user ID)和组ID 保存的set-us
Read more...

Linux/Unix系统编程手册-笔记7.用户和组

2020-07-27
Linux系统编程手册阅读
本章没啥好说的,比较有意思的的是crypt()函数,可以用来做用户身份鉴别: 1 2 3 4 5 #define _XOPEN_SOURCE #include <unistd.h> char *crypt(const char *key, const char *salt); /* Returns pointer to statically allocated string containing encrypted password on success, or NULL on error
Read more...

Linux/Unix系统编程手册-笔记6.内存分配

2020-07-25
Linux系统编程手册阅读
在堆上分配内存 系统提供了两个改变堆大小的系统调用:brk()和sbrk() 1 2 3 4 int brk(void *end_data_segment); // return 0 on success or -1 on error void *sbrk(intptr_t increment); // return previous progrom break on success, or (void *) -1 on error b
Read more...

Linux/Unix系统编程手册-笔记5.进程

2020-07-16
Linux系统编程手册阅读
进程和程序 进程是一个运行中的程序实例,一个程序中包含了如何构建一个进程的信息,这些信息包括: 二进制格式识别信息:每个程序都包含了元信息来描述
Read more...

Linux/Unix系统编程手册-笔记4.深入探究文件I/O

2020-07-12
Linux系统编程手册阅读
原子操作与竞争条件 创建文件 当同时指定O_EXCL和O_CREAT作为open()的标志位时,如果要打开文件已然存在,open()将返回一个错
Read more...

Linux/Unix系统编程手册-笔记3.通用文件I/O

2020-07-05
Linux系统编程手册阅读
文件描述符:通常是一个小的非负整数,可以用来表示所有打开的文件。每个程序都会有三个标准文件描述符: File descriptor Purpose POSIX name stdio stream 0 standard input STDIN_FILENO stdin 1 standard output STDOUT_FILENO stdout 2 standard error STDERR_FILENO
Read more...

Linux/Unix系统编程手册-笔记2.系统调用

2020-06-21
Linux系统编程手册阅读
系统调用 系统调用将处理器从用户态切换到核心态,以便CPU访问收到保护的内核内存。 系统调用的组成是固定的。每个系统调用都有一个唯一的数字来标识
Read more...

Linux/Unix系统编程手册-笔记1.基本概念

2020-05-28
Linux系统编程手册阅读
简要记录整理下。 内核的职责 进程调度:Linux 属于抢占式多任务操作系统,由内核按照一定规则分配调度CPU给程序使用。 内存管理:物理内存属于有
Read more...

Android 使用AIDL添加 native service

2020-05-27
Android
1. 下载 AOSP源码,配置编译环境 略 2. 目录结构 device下新建一个sample目录保存我们即将写的native服务,我的目录结构如下,这个s
Read more...

树莓派4B USB硬盘启动

2020-03-08
raspberrypi
树莓派4B 官方还没有提供从USB启动的方案,不过可以使用之前更改cmdline.txt的方法实现。 我的树莓派已经使用SD卡跑了挺长时间了,不
Read more...
Prev Next
Powered by Hugo | Theme - Even
site pv: spinner.svg | site uv: spinner.svg
© 2018 - 2024xistor