Die Systemaufrufe

  • From: Friedrich Gräter <webmaster@xxxxxxxxxxx>
  • To: "Mailingliste" <hydrixos@xxxxxxxxxxxxx>
  • Date: Sun, 25 Nov 2001 22:44:55 +0100

Hier ein Einblick in die Systemaufrufe:
--------------------------------------------------------------------------
-------

/*
 *
 * HydrixOS
 * <callid.h>
 *
 * (C)2001 by Friedrich Gräter
 *
 * This file contains all informations needed by applications,
 * to make a system call.
 *
 */
#ifndef _CALLID_H
#define _CALLID_H

#include <types.h>
#include <error.h>

/*
 * There are four services, that we need for the kernel interface:
 *
 * 1. Managing of memory and controlling of memory extension service
 * 2. Authenticating of access and manging of user
 * 3. Managing of IRQ handlers
 * 4. Providing of communication services
 *
 *
 * In this include file, we've the declarations of every function, so the
 * applications can use the kernel function. The Problem "How to call
them"
 * have the emulator to solve, because it is a plattform-dependent
problem.
 *
 *
 * The kernel provides a function for emulators and translators, that make
 * the system call. This function must be used by them. The declaration
 * of it is:
 *
 */

/*
 *
 * Name:
 *   syscall
 *
 * Synopsis:
 *
 *   #include <syscall.h>
 *   #include <types.h>
 *
 *   qword syscall(char fid, vaddress_t par);
 *
 * Description:
 *
 *   Calls the kernel function with function-ID "fid".
 *   The functionparameters needed are getted from the VPC of it
 *    with VPC-ID "vpci".
 *
 * Return Value:
 *
 *    The function returns a 8 byte value, that returned by the
 *   kernel funciton.
 *
 * Errors:
 *
 *   [ILLEGAL_VPCI]
 *
 */

extern qword syscall(FID fid, VPCI vpci);

/*
 *
 * Every kernel function has its own FID and
 * its own object ID.
 * There are the follow functions:
 *
 *
 * 1. Managing of memory and controlling of memory extension service
 * -----------------------------------------------------------------------
 *
 * ID NAME   SECURITY  DESCRIPTION
 *
 * 0x00 create     root   Creates a virtual address space.
 * 0x01 destroy    root   Destroys a virtual address space.
 * 0x02 palloc    ---       Allocate pages.
 * 0x03 pfree   ---       Free pages.
 * 0x04 setvmemhndlr   root   Sets the HydrixOS paging server ID.
 * 0x05 getvmemhndlr root   Gets the HydrixOS paging server ID.
 * 0x06 confirmpage  root   Called by HPS when page was stored
 * 0x07 pfork   root   Forks an address space
 * 0x08 setpage   root   Change page table settings
 * 0x09 getpage   root   Get page table settings
 *
 *
 * 2. Authenticating of access and manging of user
 * -----------------------------------------------------------------------
 *
 * ID NAME   SECURITY  DESCRIPTION
 *
 * 0x0A usrcreate  root   Creates an user.
 * 0x0B usrdestroy  root   Destroys an user.
 * 0x0C logon   root   Logs a process on a user.
 * 0x0D logoff   root / user  Logs a process off a user.
 * 0x0E allow   root / owner Allows a user to access an object
 * 0x0F deny   root / owner Deny a user to access an object
 * 0x10 getrights  root / user  Read the accessrights to an object
 * 0x11 check   ---    Checks access posibility.
 *
 *
 * 3. Managing of IRQ handlers
 * -----------------------------------------------------------------------
 *
 * ID NAME   SECURITY  DESCRIPTION
 *
 * 0x12 irqalloc  driver    Allocs an IRQ
 * 0x13 irqfree   driver    Frees an IRQ
 * 0x14 irqconfirm  driver   Confirms an IRQ
 * 0x15 schedule  root   Switch tasks when confirm IRQ
 *
 *
 * 4. Providing of communication services
 * -----------------------------------------------------------------------
 *
 * ID NAME   SECURITY  DESCRIPTION
 *
 * 0x16 signal   has access  Sends a signal to a process
 * 0x17 sendmsg   has access  Sends a message to a thread
 * 0x18 sendsvr   has access  Sends a message to server
 * 0x19 receive   ---         Recieves message parameter
 * 0x1A confirm   ---    Confirms a message
 * 0x1B retmsg   ---    Confirms a message with ret. val.
 * 0x1C logonserver  has access  Logs on a server
 * 0x1D logoffserver has access  Logs off a server
 * 0x1E confirmsig  ---    Confirms a signal
 *
 *
 * =======================================================================
 *
 *  1. Managing of memory and controlling of memory extension service
 *
 * =======================================================================
 *
 */
#define FID_CREATE     0x00
#define FID_DESTROY    0x01
#define FID_PALLOC    0x02
#define FID_PFREE   0x03
#define FID_SETVMEMHNDLR   0x04
#define FID_GETVMEMHNDLR 0x05
#define FID_CONFIRMPAGE  0x06
#define FID_PFORK   0x07
#define FID_SETPAGE   0x08
#define FID_GETPAGE   0x09
/*
 *
 * =======================================================================
 *
 * 2. Authenticating of access and manging of user
 *
 * =======================================================================
 *
 */
#define FID_USRCREATE  0x0A
#define FID_USRDESTROY  0x0B
#define FID_LOGON   0x0C
#define FID_LOGOFF   0x0D
#define FID_ALLOW   0x0E
#define FID_DENY   0x0F
#define FID_GETRIGHTS  0x10
#define FID_CHECK   0x11
/*
 *
 * =======================================================================
 *
 * 3. Managing of IRQ handlers
 *
 * =======================================================================
 *
 */
#define FID_IRQALLOC  0x12
#define FID_IRQFREE   0x13
#define FID_IRQCONFIRM  0x14
#define FID_SCHEDULE  0x15
/*
 *
 * =======================================================================
 *
 * 4. Providing of communication services
 *
 * =======================================================================
 *
 */
#define FID_SIGNAL   0x16
#define FID_SENDMSG   0x17
#define FID_SENDSVR   0x18
#define FID_RECEIVE   0x19
#define FID_CONFIRM   0x1A
#define FID_RETMSG   0x1B
#define FID_LOGONSERVER  0x1C
#define FID_LOGOFFSERVER 0x1D
#define FID_CONFIRMSIG  0x1E
/*
 *
 * ========================== NAMES OF FUNCTION ==========================
 *
 *
 *
 *
 *
 *
 *
 * =======================================================================
 *
 *  1. Managing of memory and controlling of memory extension service
 *
 * =======================================================================
 *
 */
#define N_FID_CREATE     "create"
#define N_FID_DESTROY    "destroy"
#define N_FID_PALLOC   "palloc"
#define N_FID_PFREE   "pfree"
#define N_FID_SETVMEMHNDLR  "setvmemhndlr"
#define N_FID_GETVMEMHNDLR "getvmemhndlr"
#define N_FID_CONFIRMPAGE "confirmpage"
#define N_FID_PFORK   "pfork"
#define N_FID_SETPAGE  "setpage"
#define N_FID_GETPAGE  "getpage"
/*
 *
 * =======================================================================
 *
 * 2. Authenticating of access and manging of user
 *
 * =======================================================================
 *
 */
#define N_FID_USRCREATE  "usrcreate"
#define N_FID_USRDESTROY "usrdestroy"
#define N_FID_LOGON   "logon"
#define N_FID_LOGOFF  "logoff"
#define N_FID_ALLOW   "allow"
#define N_FID_DENY   "deny"
#define N_FID_GETRIGHTS  "getrights"
#define N_FID_CHECK   "check"
/*
 *
 * =======================================================================
 *
 * 3. Managing of IRQ handlers
 *
 * =======================================================================
 *
 */
#define N_FID_IRQALLOC  "irqalloc"
#define N_FID_IRQFREE  "irqfree"
#define N_FID_IRQCONFIRM "irqconfirm"
#define N_FID_SCHEDULE  "schedule"
/*
 *
 * =======================================================================
 *
 * 4. Providing of communication services
 *
 * =======================================================================
 *
 */
#define N_FID_SIGNAL  "signal"
#define N_FID_SENDMSG  "sendmsg"
#define N_FID_SENDSVR  "sendsvr"
#define N_FID_RECEIVE  "receive"
#define N_FID_CONFIRM  "confirm"
#define N_FID_RETMSG  "retmsg"
#define N_FID_LOGONSERVER "logonserver"
#define N_FID_LOGOFFSERVER "logoffserver"
#define N_FID_CONFIRMSIG "confirmsig"

/*
 *
 * Number of available system calls
 *
 *
 */
#define SYSCALL_NUM   31


#endif

----------------------------------------------------------



---
This is not SPAM! You can unsubscribe sending an e-mail to 
hydrixos-request@xxxxxxxxxxxx with subject "unsubscribe". If
you've got questions contact webmaster@xxxxxxxxxxx .

Other related posts:

  • » Die Systemaufrufe