source: rtems/cpukit/libnetworking/sys/systm.h @ 508cd3a1

4.104.114.84.95
Last change on this file since 508cd3a1 was 508cd3a1, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/17/07 at 07:04:49

Remove P().

  • Property mode set to 100644
File size: 7.0 KB
Line 
1/*-
2 * Copyright (c) 1982, 1988, 1991, 1993
3 *      The Regents of the University of California.  All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 *    must display the following acknowledgement:
20 *      This product includes software developed by the University of
21 *      California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 *    may be used to endorse or promote products derived from this software
24 *    without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 *      @(#)systm.h     8.7 (Berkeley) 3/29/95
39 * $Id$
40 */
41
42#ifndef _SYS_SYSTM_H_
43#define _SYS_SYSTM_H_
44
45#include <rtems/rtems_bsdnet_internal.h> /* for __BSD_VA_LIST__ */
46#include <machine/cpufunc.h>
47
48extern int securelevel;         /* system security level (see init(8)) */
49
50extern int cold;                /* nonzero if we are doing a cold boot */
51extern const char *panicstr;    /* panic message */
52extern char version[];          /* system version */
53extern char copyright[];        /* system copyright */
54
55extern int nblkdev;             /* number of entries in bdevsw */
56extern int nchrdev;             /* number of entries in cdevsw */
57extern struct swdevt *swdevt;   /* swap-device information */
58extern int nswdev;              /* number of swap devices */
59extern int nswap;               /* size of swap space */
60
61extern int selwait;             /* select timeout address */
62
63extern u_char curpriority;      /* priority of current process */
64
65extern int physmem;             /* physical memory */
66
67extern dev_t dumpdev;           /* dump device */
68extern long dumplo;             /* offset into dumpdev */
69
70extern dev_t rootdev;           /* root device */
71extern struct vnode *rootvp;    /* vnode equivalent to above */
72
73extern dev_t swapdev;           /* swapping device */
74extern struct vnode *swapdev_vp;/* vnode equivalent to above */
75
76extern int boothowto;           /* reboot flags, from console subsystem */
77extern int bootverbose;         /* nonzero to print verbose messages */
78
79/*
80 * General function declarations.
81 */
82void    Debugger(const char *msg);
83int     nullop(void);
84int     eopnotsupp(void);
85int     einval(void);
86int     seltrue(dev_t dev, int which, struct proc *p);
87int     ureadc(int, struct uio *);
88void    *hashinit(int count, int type, u_long *hashmask);
89void    *phashinit(int count, int type, u_long *nentries);
90
91void    panic(const char *, ...)) __dead2;
92void    boot(int)) __dead2;
93void    cpu_boot(int);
94void    tablefull(const char *);
95int     addlog(const char *, ...);
96int     kvprintf(char const *, void (*)(int, void*), void *, int,
97                      _BSD_VA_LIST_);
98void    log(int, const char *, ...);
99int     printf(const char *, ...);
100int     sprintf(char *buf, const char *, ...);
101void    uprintf(const char *, ...);
102void    ttyprintf(struct tty *, const char *, ...);
103
104#define bcopy(f,t,n) memcpy((t),(f),(n))
105#define bzero(p,n) memset((p),(0),(n))
106
107int     copystr(const void *kfaddr, void *kdaddr, size_t len,
108                size_t *lencopied);
109int     copyinstr(const void *udaddr, void *kaddr, size_t len,
110                size_t *lencopied);
111int     copyin(const void *udaddr, void *kaddr, size_t len);
112int     copyout(const void *kaddr, void *udaddr, size_t len);
113
114int     fubyte(const void *base);
115int     fuibyte(const void *base);
116int     subyte(void *base, int byte);
117int     suibyte(void *base, int byte);
118int     fuword(const void *base);
119int     suword(void *base, int word);
120int     susword(void *base, int word);
121
122int     hzto(struct timeval *tv);
123void    realitexpire(void *);
124
125struct clockframe;
126void    hardclock(struct clockframe *frame);
127void    softclock(void);
128void    statclock(struct clockframe *frame);
129
130void    startprofclock(struct proc *);
131void    stopprofclock(struct proc *);
132void    setstatclockrate(int hzrate);
133
134void    hardupdate(long);
135void    hardpps(struct timeval *tvp, long usec);
136
137#include <sys/libkern.h>
138
139/* Initialize the world */
140extern void consinit(void);
141extern void usrinfoinit(void);
142extern void cpu_initclocks(void);
143extern void vntblinit(void);
144extern void nchinit(void);
145
146/* Finalize the world. */
147void    shutdown_nice(void);
148
149/*
150 * Kernel to clock driver interface.
151 */
152void    inittodr(time_t base);
153void    resettodr(void);
154void    startrtclock(void);
155
156/* Timeouts */
157typedef void (timeout_t)(void *); /* actual timeout function type */
158typedef timeout_t *timeout_func_t; /* a pointer to this type */
159
160void timeout(timeout_func_t, void *, int);
161void untimeout(timeout_func_t, void *);
162void    logwakeup(void);
163
164/* Various other callout lists that modules might want to know about */
165/* shutdown callout list definitions */
166typedef void (*bootlist_fn)(int,void *);
167int at_shutdown(bootlist_fn function, void *arg, int);
168int rm_at_shutdown(bootlist_fn function, void *arg);
169#define SHUTDOWN_PRE_SYNC 0
170#define SHUTDOWN_POST_SYNC 1
171
172/* forking */ /* XXX not yet */
173typedef void (*forklist_fn)(struct proc *parent,struct proc *child,int flags);
174int at_fork(forklist_fn function);
175int rm_at_fork(forklist_fn function);
176
177/* exiting */
178typedef void (*exitlist_fn)(struct proc *procp);
179int at_exit(exitlist_fn function);
180int rm_at_exit(exitlist_fn function);
181
182/* Not exactly a callout LIST, but a callout entry..                    */
183/* Allow an external module to define a hardware watchdog tickler       */
184/* Normally a process would do this, but there are times when the       */
185/* kernel needs to be able to hold off the watchdog, when the process   */
186/* is not active, e.g. when dumping core. Costs us a whole 4 bytes to   */
187/* make this generic. the variable is in kern_shutdown.c */
188typedef void (*watchdog_tickle_fn)(void);
189extern watchdog_tickle_fn wdog_tickler;
190
191
192/*
193 * Common `proc' functions are declared here so that proc.h can be included
194 * less often.
195 */
196int     tsleep(void *chan, int pri, char *wmesg, int timo);
197void    wakeup(void *chan);
198
199#endif /* !_SYS_SYSTM_H_ */
Note: See TracBrowser for help on using the repository browser.