diff options
author | Richard Braun <rbraun@sceen.net> | 2017-04-29 21:47:28 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-04-29 21:59:03 +0200 |
commit | 5a048710ee9dd4112ec467da29fef27ef18b0876 (patch) | |
tree | 6998b99fc74d459c00d0e3bd2d50c56502c24be2 | |
parent | d78a948f0a1d8b7b3385944c736d7cffd8ca67a7 (diff) |
New stdio.h standard header
Make kernel code obtain definitions for the printf family of functions
through the inclusion of the standard stdio.h header.
-rw-r--r-- | Makefrag.am | 1 | ||||
-rw-r--r-- | arch/x86/machine/acpimp.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/biosmem.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/boot.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/cpu.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/lapic.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/pmap.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/strace.c | 2 | ||||
-rw-r--r-- | arch/x86/machine/trap.c | 3 | ||||
-rw-r--r-- | arch/x86/machine/trap.h | 2 | ||||
-rw-r--r-- | include/stdio.h | 24 | ||||
-rw-r--r-- | kern/kmem.c | 3 | ||||
-rw-r--r-- | kern/llsync.c | 3 | ||||
-rw-r--r-- | kern/panic.c | 2 | ||||
-rw-r--r-- | kern/percpu.c | 2 | ||||
-rw-r--r-- | kern/printf.c | 4 | ||||
-rw-r--r-- | kern/sprintf.c | 2 | ||||
-rw-r--r-- | kern/sref.c | 2 | ||||
-rw-r--r-- | kern/syscnt.c | 2 | ||||
-rw-r--r-- | kern/task.c | 1 | ||||
-rw-r--r-- | kern/thread.c | 2 | ||||
-rw-r--r-- | kern/work.c | 3 | ||||
-rw-r--r-- | test/test_llsync_defer.c | 2 | ||||
-rw-r--r-- | test/test_mutex_pi.c | 2 | ||||
-rw-r--r-- | test/test_pmap_update_mp.c | 2 | ||||
-rw-r--r-- | test/test_sref_dirty_zeroes.c | 2 | ||||
-rw-r--r-- | test/test_sref_noref.c | 2 | ||||
-rw-r--r-- | test/test_sref_weakref.c | 1 | ||||
-rw-r--r-- | test/test_vm_page_fill.c | 1 | ||||
-rw-r--r-- | test/test_xcall.c | 2 | ||||
-rw-r--r-- | vm/vm_map.c | 2 | ||||
-rw-r--r-- | vm/vm_page.c | 3 |
32 files changed, 57 insertions, 32 deletions
diff --git a/Makefrag.am b/Makefrag.am index b7013c2..8a17c18 100644 --- a/Makefrag.am +++ b/Makefrag.am @@ -4,6 +4,7 @@ include doc/Makefrag.am EXTRA_DIST += tools/qemu.sh x15_SOURCES += \ + include/stdio.h \ include/string.h x15_SOURCES += \ diff --git a/arch/x86/machine/acpimp.c b/arch/x86/machine/acpimp.c index 527b305..8d2433a 100644 --- a/arch/x86/machine/acpimp.c +++ b/arch/x86/machine/acpimp.c @@ -17,6 +17,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -24,7 +25,6 @@ #include <kern/kmem.h> #include <kern/macros.h> #include <kern/panic.h> -#include <kern/printf.h> #include <machine/acpimp.h> #include <machine/biosmem.h> #include <machine/cpu.h> diff --git a/arch/x86/machine/biosmem.c b/arch/x86/machine/biosmem.c index 060be44..35e015b 100644 --- a/arch/x86/machine/biosmem.c +++ b/arch/x86/machine/biosmem.c @@ -18,6 +18,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -25,7 +26,6 @@ #include <kern/macros.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> #include <machine/biosmem.h> #include <machine/boot.h> #include <machine/cpu.h> diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c index e787901..011a319 100644 --- a/arch/x86/machine/boot.c +++ b/arch/x86/machine/boot.c @@ -45,6 +45,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/init.h> @@ -54,7 +55,6 @@ #include <kern/panic.h> #include <kern/param.h> #include <kern/percpu.h> -#include <kern/printf.h> #include <kern/sleepq.h> #include <kern/sref.h> #include <kern/syscnt.h> diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c index 1fd3fa8..ff7b722 100644 --- a/arch/x86/machine/cpu.c +++ b/arch/x86/machine/cpu.c @@ -17,6 +17,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -25,7 +26,6 @@ #include <kern/panic.h> #include <kern/param.h> #include <kern/percpu.h> -#include <kern/printf.h> #include <kern/thread.h> #include <kern/xcall.h> #include <machine/acpimp.h> diff --git a/arch/x86/machine/lapic.c b/arch/x86/machine/lapic.c index 90886c7..89affc5 100644 --- a/arch/x86/machine/lapic.c +++ b/arch/x86/machine/lapic.c @@ -17,12 +17,12 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <kern/init.h> #include <kern/macros.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> #include <kern/thread.h> #include <machine/cpu.h> #include <machine/lapic.h> diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c index 63a2909..1de9b09 100644 --- a/arch/x86/machine/pmap.c +++ b/arch/x86/machine/pmap.c @@ -19,6 +19,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -33,7 +34,6 @@ #include <kern/param.h> #include <kern/percpu.h> #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <kern/syscnt.h> #include <kern/thread.h> #include <machine/biosmem.h> diff --git a/arch/x86/machine/strace.c b/arch/x86/machine/strace.c index 89f8569..8aea4b0 100644 --- a/arch/x86/machine/strace.c +++ b/arch/x86/machine/strace.c @@ -16,12 +16,12 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/init.h> #include <kern/kmem.h> #include <kern/param.h> -#include <kern/printf.h> #include <machine/elf.h> #include <machine/multiboot.h> #include <machine/pmap.h> diff --git a/arch/x86/machine/trap.c b/arch/x86/machine/trap.c index 2d25ce9..9a2fe15 100644 --- a/arch/x86/machine/trap.c +++ b/arch/x86/machine/trap.c @@ -19,11 +19,12 @@ * additional configuration and resources to be properly handled. */ +#include <stdio.h> + #include <kern/assert.h> #include <kern/init.h> #include <kern/macros.h> #include <kern/param.h> -#include <kern/printf.h> #include <kern/thread.h> #include <machine/cpu.h> #include <machine/lapic.h> diff --git a/arch/x86/machine/trap.h b/arch/x86/machine/trap.h index f38c0c4..a652382 100644 --- a/arch/x86/machine/trap.h +++ b/arch/x86/machine/trap.h @@ -68,9 +68,9 @@ #ifndef __ASSEMBLER__ #include <stdint.h> +#include <stdio.h> #include <kern/macros.h> -#include <kern/printf.h> #ifdef __LP64__ diff --git a/include/stdio.h b/include/stdio.h new file mode 100644 index 0000000..a9aed9e --- /dev/null +++ b/include/stdio.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017 Richard Braun. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _STDIO_H +#define _STDIO_H + +#include <kern/printf.h> +#include <kern/sprintf.h> + +#endif /* _STDIO_H */ diff --git a/kern/kmem.c b/kern/kmem.c index 60b8db9..5cce558 100644 --- a/kern/kmem.c +++ b/kern/kmem.c @@ -44,6 +44,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -57,8 +58,6 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> -#include <kern/sprintf.h> #include <kern/thread.h> #include <machine/cpu.h> #include <machine/pmap.h> diff --git a/kern/llsync.c b/kern/llsync.c index 0c81c0f..1942576 100644 --- a/kern/llsync.c +++ b/kern/llsync.c @@ -34,6 +34,7 @@ #include <stdbool.h> #include <stddef.h> +#include <stdio.h> #include <kern/assert.h> #include <kern/condition.h> @@ -46,9 +47,7 @@ #include <kern/mutex.h> #include <kern/param.h> #include <kern/percpu.h> -#include <kern/printf.h> #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <kern/syscnt.h> #include <kern/work.h> #include <machine/cpu.h> diff --git a/kern/panic.c b/kern/panic.c index 470c421..34d8c13 100644 --- a/kern/panic.c +++ b/kern/panic.c @@ -16,10 +16,10 @@ */ #include <stdarg.h> +#include <stdio.h> #include <kern/atomic.h> #include <kern/panic.h> -#include <kern/printf.h> #include <machine/cpu.h> #include <machine/strace.h> diff --git a/kern/percpu.c b/kern/percpu.c index 6008b64..5e4ff82 100644 --- a/kern/percpu.c +++ b/kern/percpu.c @@ -17,6 +17,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -26,7 +27,6 @@ #include <kern/panic.h> #include <kern/param.h> #include <kern/percpu.h> -#include <kern/printf.h> #include <machine/cpu.h> #include <vm/vm_kmem.h> #include <vm/vm_page.h> diff --git a/kern/printf.c b/kern/printf.c index 6cd6464..7e48b5d 100644 --- a/kern/printf.c +++ b/kern/printf.c @@ -15,9 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <kern/printf.h> +#include <stdio.h> + #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <machine/cpu.h> /* diff --git a/kern/sprintf.c b/kern/sprintf.c index 3d2bf2d..a606d86 100644 --- a/kern/sprintf.c +++ b/kern/sprintf.c @@ -18,9 +18,9 @@ #include <stdarg.h> #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <kern/limits.h> -#include <kern/sprintf.h> #include <kern/types.h> /* diff --git a/kern/sref.c b/kern/sref.c index 9c2ddea..9ce7a83 100644 --- a/kern/sref.c +++ b/kern/sref.c @@ -43,6 +43,7 @@ #include <stdbool.h> #include <stddef.h> +#include <stdio.h> #include <kern/assert.h> #include <kern/condition.h> @@ -55,7 +56,6 @@ #include <kern/param.h> #include <kern/percpu.h> #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <kern/sref.h> #include <kern/sref_i.h> #include <kern/syscnt.h> diff --git a/kern/syscnt.c b/kern/syscnt.c index 74559ea..5b479f3 100644 --- a/kern/syscnt.c +++ b/kern/syscnt.c @@ -15,13 +15,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdio.h> #include <string.h> #include <kern/atomic.h> #include <kern/init.h> #include <kern/list.h> #include <kern/mutex.h> -#include <kern/printf.h> #include <kern/spinlock.h> #include <kern/syscnt.h> diff --git a/kern/task.c b/kern/task.c index d2aaa80..7f1c53d 100644 --- a/kern/task.c +++ b/kern/task.c @@ -16,6 +16,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/error.h> diff --git a/kern/thread.c b/kern/thread.c index 8a87aca..947b8cf 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -83,6 +83,7 @@ #include <stdbool.h> #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -101,7 +102,6 @@ #include <kern/percpu.h> #include <kern/sleepq.h> #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <kern/sref.h> #include <kern/syscnt.h> #include <kern/task.h> diff --git a/kern/work.c b/kern/work.c index a81e8de..714af35 100644 --- a/kern/work.c +++ b/kern/work.c @@ -16,6 +16,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <kern/assert.h> #include <kern/bitmap.h> @@ -27,9 +28,7 @@ #include <kern/panic.h> #include <kern/param.h> #include <kern/percpu.h> -#include <kern/printf.h> #include <kern/spinlock.h> -#include <kern/sprintf.h> #include <kern/syscnt.h> #include <kern/thread.h> #include <kern/work.h> diff --git a/test/test_llsync_defer.c b/test/test_llsync_defer.c index 9bce016..2674799 100644 --- a/test/test_llsync_defer.c +++ b/test/test_llsync_defer.c @@ -29,6 +29,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/condition.h> @@ -39,7 +40,6 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> #include <kern/thread.h> #include <kern/work.h> #include <test/test.h> diff --git a/test/test_mutex_pi.c b/test/test_mutex_pi.c index 8f86475..cfadb59 100644 --- a/test/test_mutex_pi.c +++ b/test/test_mutex_pi.c @@ -78,13 +78,13 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/cpumap.h> #include <kern/error.h> #include <kern/mutex.h> #include <kern/panic.h> -#include <kern/printf.h> #include <kern/syscnt.h> #include <kern/thread.h> #include <kern/turnstile.h> diff --git a/test/test_pmap_update_mp.c b/test/test_pmap_update_mp.c index 0c5e2db..5588ce8 100644 --- a/test/test_pmap_update_mp.c +++ b/test/test_pmap_update_mp.c @@ -25,6 +25,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <string.h> #include <kern/condition.h> @@ -33,7 +34,6 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> #include <kern/thread.h> #include <test/test.h> #include <vm/vm_kmem.h> diff --git a/test/test_sref_dirty_zeroes.c b/test/test_sref_dirty_zeroes.c index 4099760..be4c491 100644 --- a/test/test_sref_dirty_zeroes.c +++ b/test/test_sref_dirty_zeroes.c @@ -27,6 +27,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <kern/condition.h> #include <kern/error.h> @@ -34,7 +35,6 @@ #include <kern/macros.h> #include <kern/mutex.h> #include <kern/panic.h> -#include <kern/sprintf.h> #include <kern/sref.h> #include <kern/syscnt.h> #include <kern/thread.h> diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c index b98edd3..f556d32 100644 --- a/test/test_sref_noref.c +++ b/test/test_sref_noref.c @@ -33,6 +33,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <kern/condition.h> #include <kern/error.h> @@ -40,7 +41,6 @@ #include <kern/macros.h> #include <kern/mutex.h> #include <kern/panic.h> -#include <kern/sprintf.h> #include <kern/sref.h> #include <kern/syscnt.h> #include <kern/thread.h> diff --git a/test/test_sref_weakref.c b/test/test_sref_weakref.c index 65918a1..85d4cbe 100644 --- a/test/test_sref_weakref.c +++ b/test/test_sref_weakref.c @@ -33,6 +33,7 @@ */ #include <stddef.h> +#include <stdio.h> #include <kern/error.h> #include <kern/macros.h> diff --git a/test/test_vm_page_fill.c b/test/test_vm_page_fill.c index 7171199..fe35103 100644 --- a/test/test_vm_page_fill.c +++ b/test/test_vm_page_fill.c @@ -24,6 +24,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <kern/cpumap.h> #include <kern/error.h> diff --git a/test/test_xcall.c b/test/test_xcall.c index 3552944..4e02d6f 100644 --- a/test/test_xcall.c +++ b/test/test_xcall.c @@ -21,11 +21,11 @@ */ #include <stddef.h> +#include <stdio.h> #include <kern/error.h> #include <kern/cpumap.h> #include <kern/panic.h> -#include <kern/printf.h> #include <kern/thread.h> #include <kern/xcall.h> #include <test/test.h> diff --git a/vm/vm_map.c b/vm/vm_map.c index 217aae7..657f4b5 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -21,6 +21,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <kern/assert.h> #include <kern/error.h> @@ -31,7 +32,6 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> #include <kern/rbtree.h> #include <machine/pmap.h> #include <vm/vm_adv.h> diff --git a/vm/vm_page.c b/vm/vm_page.c index 138f028..284964a 100644 --- a/vm/vm_page.c +++ b/vm/vm_page.c @@ -32,6 +32,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <string.h> #include <kern/assert.h> @@ -41,8 +42,6 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printf.h> -#include <kern/sprintf.h> #include <kern/thread.h> #include <machine/cpu.h> #include <machine/pmap.h> |