source: branches/minix3-book/include/sys/svrctl.h@ 20

Last change on this file since 20 was 4, checked in by Mattia Monga, 14 years ago

Importazione sorgenti libro

File size: 1.6 KB
Line 
1/*
2sys/svrctl.h
3
4Created: Feb 15, 1994 by Philip Homburg <philip@cs.vu.nl>
5*/
6
7#ifndef _SYS__SVRCTL_H
8#define _SYS__SVRCTL_H
9
10#ifndef _TYPES_H
11#include <sys/types.h>
12#endif
13
14/* Server control commands have the same encoding as the commands for ioctls. */
15#include <minix/ioctl.h>
16
17/* MM controls. */
18#define MMSIGNON _IO ('M', 4)
19#define MMSWAPON _IOW('M', 5, struct mmswapon)
20#define MMSWAPOFF _IO ('M', 6)
21#define MMGETPARAM _IOW('M', 5, struct sysgetenv)
22#define MMSETPARAM _IOR('M', 7, struct sysgetenv)
23
24/* FS controls. */
25#define FSSIGNON _IOW('F', 2, struct fssignon)
26#define FSDEVMAP _IORW('F', 5, struct fsdevmap)
27
28/* Kernel controls. */
29#define SYSSENDMASK _IO ('S', 4)
30#define SYSSIGNON _IOR('S', 2, struct systaskinfo)
31#define SYSGETENV _IOW('S', 1, struct sysgetenv)
32
33struct mmswapon {
34 u32_t offset; /* Starting offset within file. */
35 u32_t size; /* Size of swap area. */
36 char file[128]; /* Name of swap file/device. */
37};
38
39struct svrqueryparam {
40 char *param; /* Names of parameters to query. */
41 size_t psize; /* Length of param[]. */
42 char *value; /* To return values. */
43 size_t vsize;
44};
45
46/* A proper system call must be created later. */
47#include <minix/dmap.h>
48struct fssignon {
49 dev_t dev; /* Device to manage. */
50 enum dev_style style; /* Management style. */
51};
52
53struct systaskinfo {
54 int proc_nr; /* Process number of caller. */
55};
56
57struct sysgetenv {
58 char *key; /* Name requested. */
59 size_t keylen; /* Length of name including \0. */
60 char *val; /* Buffer for returned data. */
61 size_t vallen; /* Size of return data buffer. */
62};
63
64_PROTOTYPE( int svrctl, (int _request, void *_data) );
65
66#endif /* _SYS__SVRCTL_H */
Note: See TracBrowser for help on using the repository browser.