diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-03-31 12:57:05 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-05-19 16:11:56 +0200 |
commit | b3c5e41bc05bc622c637d1da75a3c63091e4e789 (patch) | |
tree | 21327a66953e3014359ac8b4fce2e814ed2fdd62 /kern/macro_help.h | |
parent | 8b026d66eb22e1fcf1cb03974606dca991aae392 (diff) |
kern: import `macros.h' from x15
Import the macro definitions from the x15 kernel project, and replace
all similar definitions littered all over the place with it.
Importing this file will make importing code from the x15 kernel
easier. We are already using the red-black tree implementation and
the slab allocator from it, and we will import even more code in the
near future.
* kern/list.h: Do not define `structof', include `macros.h' instead.
* kern/rbtree.h: Likewise.
* kern/slab.c: Do not define `ARRAY_SIZE', include `macros.h' instead.
* i386/grub/misc.h: Likewise.
* i386/i386/xen.h: Do not define `barrier', include `macros.h' instead.
* kern/macro_help.h: Delete file. Replaced by `macros.h'.
* kern/macros.h: New file.
* Makefrag.am (libkernel_a_SOURCES): Add new file, remove old file.
* device/dev_master.h: Adopt accordingly.
* device/io_req.h: Likewise.
* device/net_io.h: Likewise.
* i386/intel/read_fault.c: Likewise.
* ipc/ipc_kmsg.h: Likewise.
* ipc/ipc_mqueue.h: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_port.h: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/ipc_splay.c: Likewise.
* ipc/ipc_splay.h: Likewise.
* kern/assert.h: Likewise.
* kern/ast.h: Likewise.
* kern/pc_sample.h: Likewise.
* kern/refcount.h: Likewise.
* kern/sched.h: Likewise.
* kern/sched_prim.c: Likewise.
* kern/timer.c: Likewise.
* kern/timer.h: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_map.h: Likewise.
* vm/vm_object.h: Likewise.
* vm/vm_page.h: Likewise.
Diffstat (limited to 'kern/macro_help.h')
-rw-r--r-- | kern/macro_help.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/kern/macro_help.h b/kern/macro_help.h deleted file mode 100644 index 7ce171f..0000000 --- a/kern/macro_help.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ -/* - * File: kern/macro_help.h - * - * Provide help in making lint-free macro routines - * - */ - -#ifndef _KERN_MACRO_HELP_H_ -#define _KERN_MACRO_HELP_H_ - -#if !defined(MACRO_BEGIN) - -#include <mach/boolean.h> - -#define NEVER FALSE -#define ALWAYS TRUE - -#define MACRO_BEGIN ({ -#define MACRO_END }) - -#define MACRO_RETURN if (ALWAYS) return - -#endif /* !MACRO_BEGIN */ - -#endif /* _KERN_MACRO_HELP_H_ */ |