xv6-simplified 0.1
简化版xv6
Loading...
Searching...
No Matches
Functions
exec.c File Reference

系统调用sys_exec会调用的exec()函数,以及其他辅助函数 More...

#include "include/types.h"
#include "include/riscv.h"
#include "include/defs.h"
#include "include/elf.h"
#include "include/fat32.h"
#include "include/param.h"
#include "include/proc.h"
Include dependency graph for exec.c:

Functions

int flags2perm (int flags)
 获取页表的权限位并根据已有权限增添可执行/可写权限
 
int exec (char *path, char **argv)
 exec系统调用,执行path指向的文件,携带argv作为参数
 

Detailed Description

系统调用sys_exec会调用的exec()函数,以及其他辅助函数

Date
23.05.01
Author
xin
Version
0.1 @status Stable

Function Documentation

◆ exec()

int exec ( char *  path,
char **  argv 
)

exec系统调用,执行path指向的文件,携带argv作为参数

Parameters
path执行的文件路径
argv携带的参数
Returns
返回携带的参数个数,若出现错误返回-1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flags2perm()

int flags2perm ( int  flags)

获取页表的权限位并根据已有权限增添可执行/可写权限

Parameters
flags程序的flags字段
Returns
新的权限位
Here is the caller graph for this function: