do_iopenable.c

来自「Minix比较全的源码」· C语言 代码 · 共 37 行

C
37
字号
/* The system call implemented in this file: *   m_type:	SYS_IOPENABLE * * The parameters for this system call are: *    m2_i2:	IO_ENDPT	(process to give I/O Protection Level bits) * * Author: *    Jorrit N. Herder <jnherder@cs.vu.nl> */#include "../../system.h"#include "../../kernel.h"#include "proto.h"/*===========================================================================* *			        do_iopenable				     * *===========================================================================*/PUBLIC int do_iopenable(m_ptr)register message *m_ptr;	/* pointer to request message */{  int proc_nr;#if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */  if (m_ptr->IO_ENDPT == SELF) {	proc_nr = who_p;  } else if(!isokendpt(m_ptr->IO_ENDPT, &proc_nr))	return(EINVAL);  enable_iop(proc_addr(proc_nr));  return(OK);#else  return(EPERM);#endif}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?