[kernel] test run sorting some includes

No functional change.
This commit is contained in:
Travis Geiselbrecht
2019-07-13 17:21:00 -07:00
parent 4aa556b837
commit df32504748
31 changed files with 109 additions and 100 deletions

View File

@@ -16,15 +16,16 @@
* @brief Debug console functions.
*/
#include <lk/debug.h>
#include <stdio.h>
#include <kernel/debug.h>
#include <kernel/mp.h>
#include <kernel/thread.h>
#include <kernel/timer.h>
#include <kernel/debug.h>
#include <kernel/mp.h>
#include <lk/console_cmd.h>
#include <lk/debug.h>
#include <lk/err.h>
#include <platform.h>
#include <lk/console_cmd.h>
#include <stdio.h>
static int cmd_threads(int argc, const cmd_args *argv);
static int cmd_threadstats(int argc, const cmd_args *argv);

View File

@@ -25,11 +25,11 @@
* @{
*/
#include <kernel/event.h>
#include <lk/debug.h>
#include <assert.h>
#include <lk/err.h>
#include <kernel/event.h>
#include <kernel/thread.h>
#include <lk/debug.h>
#include <lk/err.h>
/**
* @brief Initialize an event object

View File

@@ -7,10 +7,10 @@
*/
#pragma once
#include <kernel/thread.h>
#include <lk/compiler.h>
#include <stdbool.h>
#include <sys/types.h>
#include <kernel/thread.h>
__BEGIN_CDECLS

View File

@@ -7,11 +7,11 @@
*/
#pragma once
#include <lk/compiler.h>
#include <kernel/thread.h>
#include <limits.h>
#include <lk/compiler.h>
#include <stdbool.h>
#include <stdint.h>
#include <kernel/thread.h>
__BEGIN_CDECLS

View File

@@ -8,10 +8,10 @@
*/
#pragma once
#include <kernel/thread.h>
#include <lk/compiler.h>
#include <lk/debug.h>
#include <stdint.h>
#include <kernel/thread.h>
__BEGIN_CDECLS

View File

@@ -7,9 +7,9 @@
*/
#pragma once
#include <arch.h>
#include <stddef.h>
#include <stdlib.h>
#include <arch.h>
#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
#define IS_PAGE_ALIGNED(x) IS_ALIGNED(x, PAGE_SIZE)

View File

@@ -7,9 +7,8 @@
*/
#pragma once
#include <sys/types.h>
#include <lk/compiler.h>
#include <sys/types.h>
__BEGIN_CDECLS

View File

@@ -16,9 +16,9 @@
#pragma once
#include <lk/compiler.h>
#include <kernel/thread.h>
#include <kernel/mutex.h>
#include <kernel/thread.h>
#include <lk/compiler.h>
__BEGIN_CDECLS

View File

@@ -7,8 +7,8 @@
*/
#pragma once
#include <lk/compiler.h>
#include <arch/spinlock.h>
#include <lk/compiler.h>
__BEGIN_CDECLS

View File

@@ -7,15 +7,15 @@
*/
#pragma once
#include <sys/types.h>
#include <lk/list.h>
#include <lk/compiler.h>
#include <arch/defines.h>
#include <arch/ops.h>
#include <arch/thread.h>
#include <kernel/wait.h>
#include <kernel/spinlock.h>
#include <kernel/wait.h>
#include <lk/compiler.h>
#include <lk/debug.h>
#include <lk/list.h>
#include <sys/types.h>
#if WITH_KERNEL_VM
/* forward declaration */

View File

@@ -30,13 +30,13 @@
#ifndef ASSEMBLY
#include <sys/types.h>
#include <stdint.h>
#include <lk/compiler.h>
#include <lk/list.h>
#include <stdlib.h>
#include <arch.h>
#include <arch/mmu.h>
#include <lk/compiler.h>
#include <lk/list.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
__BEGIN_CDECLS

View File

@@ -7,12 +7,12 @@
*/
#pragma once
#include <sys/types.h>
#include <lk/list.h>
#include <lk/compiler.h>
#include <arch/defines.h>
#include <arch/ops.h>
#include <arch/thread.h>
#include <lk/compiler.h>
#include <lk/list.h>
#include <sys/types.h>
__BEGIN_CDECLS

View File

@@ -5,13 +5,13 @@
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <lk/compiler.h>
#include <lk/debug.h>
#include <kernel/debug.h>
#include <kernel/thread.h>
#include <kernel/timer.h>
#include <kernel/mp.h>
#include <kernel/port.h>
#include <kernel/thread.h>
#include <kernel/timer.h>
#include <lk/compiler.h>
#include <lk/debug.h>
void kernel_init(void) {
// if enabled, configure the kernel's event log

View File

@@ -8,12 +8,12 @@
#include <kernel/mp.h>
#include <stdlib.h>
#include <lk/debug.h>
#include <assert.h>
#include <lk/trace.h>
#include <arch/mp.h>
#include <assert.h>
#include <kernel/spinlock.h>
#include <lk/debug.h>
#include <lk/trace.h>
#include <stdlib.h>
#define LOCAL_TRACE 0

View File

@@ -16,10 +16,11 @@
*/
#include <kernel/mutex.h>
#include <lk/debug.h>
#include <assert.h>
#include <lk/err.h>
#include <kernel/thread.h>
#include <lk/debug.h>
#include <lk/err.h>
/**
* @brief Initialize a mutex_t

View File

@@ -8,14 +8,14 @@
#include "kernel/novm.h"
#include <lk/err.h>
#include <assert.h>
#include <kernel/mutex.h>
#include <lk/console_cmd.h>
#include <lk/err.h>
#include <lk/init.h>
#include <lk/trace.h>
#include <stdlib.h>
#include <string.h>
#include <lk/init.h>
#include <kernel/mutex.h>
#include <lk/console_cmd.h>
#define LOCAL_TRACE 0

View File

@@ -13,14 +13,15 @@
*
*/
#include <kernel/port.h>
#include <kernel/thread.h>
#include <lk/debug.h>
#include <lk/err.h>
#include <lk/list.h>
#include <lk/pow2.h>
#include <malloc.h>
#include <string.h>
#include <lk/pow2.h>
#include <lk/err.h>
#include <kernel/thread.h>
#include <kernel/port.h>
// write ports can be in two states, open and closed, which have a
// different magic number.

View File

@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <kernel/semaphore.h>
#include <kernel/thread.h>
#include <lk/debug.h>
#include <lk/err.h>
#include <kernel/semaphore.h>
#include <kernel/thread.h>
void sem_init(semaphore_t *sem, unsigned int value) {
*sem = (semaphore_t)SEMAPHORE_INITIAL_VALUE(*sem, value);

View File

@@ -15,20 +15,21 @@
* @defgroup thread Threads
* @{
*/
#include <lk/debug.h>
#include <assert.h>
#include <lk/list.h>
#include <malloc.h>
#include <string.h>
#include <printf.h>
#include <lk/err.h>
#include <kernel/thread.h>
#include <kernel/timer.h>
#include <assert.h>
#include <kernel/debug.h>
#include <kernel/mp.h>
#include <platform.h>
#include <target.h>
#include <kernel/timer.h>
#include <lib/heap.h>
#include <lk/debug.h>
#include <lk/err.h>
#include <lk/list.h>
#include <malloc.h>
#include <platform.h>
#include <printf.h>
#include <string.h>
#include <target.h>
#if WITH_KERNEL_VM
#include <kernel/vm.h>
#endif

View File

@@ -19,16 +19,17 @@
*
* @{
*/
#include <lk/debug.h>
#include <lk/trace.h>
#include <assert.h>
#include <lk/list.h>
#include <kernel/thread.h>
#include <kernel/timer.h>
#include <assert.h>
#include <kernel/debug.h>
#include <kernel/spinlock.h>
#include <platform/timer.h>
#include <kernel/thread.h>
#include <lk/debug.h>
#include <lk/list.h>
#include <lk/trace.h>
#include <platform.h>
#include <platform/timer.h>
#define LOCAL_TRACE 0

View File

@@ -6,12 +6,13 @@
* https://opensource.org/licenses/MIT
*/
#include <kernel/vm.h>
#include "vm_priv.h"
#include <lk/trace.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <lk/trace.h>
#include "vm_priv.h"
#define LOCAL_TRACE 0

View File

@@ -6,17 +6,18 @@
* https://opensource.org/licenses/MIT
*/
#include <kernel/vm.h>
#include "vm_priv.h"
#include <lk/trace.h>
#include <assert.h>
#include <lk/list.h>
#include <stdlib.h>
#include <lk/err.h>
#include <string.h>
#include <lk/pow2.h>
#include <lk/console_cmd.h>
#include <kernel/mutex.h>
#include <lk/console_cmd.h>
#include <lk/err.h>
#include <lk/list.h>
#include <lk/pow2.h>
#include <lk/trace.h>
#include <stdlib.h>
#include <string.h>
#include "vm_priv.h"
#define LOCAL_TRACE 0

View File

@@ -6,16 +6,17 @@
* https://opensource.org/licenses/MIT
*/
#include <kernel/vm.h>
#include "vm_priv.h"
#include <lk/trace.h>
#include <lk/err.h>
#include <string.h>
#include <lk/init.h>
#include <lk/console_cmd.h>
#include <arch/mmu.h>
#include <kernel/thread.h>
#include <lk/console_cmd.h>
#include <lk/debug.h>
#include <lk/err.h>
#include <lk/init.h>
#include <lk/trace.h>
#include <string.h>
#include "vm_priv.h"
#define LOCAL_TRACE 0

View File

@@ -7,9 +7,9 @@
*/
#pragma once
#include <kernel/vm.h>
#include <stdint.h>
#include <sys/types.h>
#include <kernel/vm.h>
/* simple boot time allocator */
void *boot_alloc_mem(size_t len) __MALLOC;

View File

@@ -5,13 +5,13 @@
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <lk/trace.h>
#include <assert.h>
#include <lk/err.h>
#include <string.h>
#include <lk/console_cmd.h>
#include <kernel/vm.h>
#include <kernel/mutex.h>
#include <kernel/vm.h>
#include <lk/console_cmd.h>
#include <lk/err.h>
#include <lk/trace.h>
#include <string.h>
#include "vm_priv.h"
#define LOCAL_TRACE 0

View File

@@ -7,10 +7,10 @@
*/
#pragma once
#include <lk/compiler.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
#include <lk/compiler.h>
/* command args */
typedef struct {

View File

@@ -8,9 +8,9 @@
#pragma once
#include <lk/compiler.h>
#include <platform/debug.h>
#include <stddef.h>
#include <stdio.h>
#include <platform/debug.h>
#if !defined(LK_DEBUGLEVEL)
#define LK_DEBUGLEVEL 0

View File

@@ -8,8 +8,8 @@
#pragma once
#include <lk/compiler.h>
#include <stddef.h>
#include <stdbool.h>
#include <stddef.h>
__BEGIN_CDECLS

View File

@@ -8,9 +8,9 @@
#pragma once
#include <lk/compiler.h>
#include <sys/types.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
__BEGIN_CDECLS

View File

@@ -11,9 +11,9 @@
* a init hook that is called at increasing init levels as the system is
* initialized.
*/
#include <arch/ops.h>
#include <lk/init.h>
#include <arch/ops.h>
#include <assert.h>
#include <lk/compiler.h>
#include <lk/debug.h>

View File

@@ -10,19 +10,20 @@
* Main entry point to the OS. Initializes modules in order and creates
* the default thread.
*/
#include <lk/compiler.h>
#include <lk/debug.h>
#include <string.h>
#include <lk/main.h>
#include <app.h>
#include <arch.h>
#include <platform.h>
#include <target.h>
#include <lib/heap.h>
#include <kernel/mutex.h>
#include <kernel/novm.h>
#include <kernel/thread.h>
#include <lib/heap.h>
#include <lk/compiler.h>
#include <lk/debug.h>
#include <lk/init.h>
#include <lk/main.h>
#include <platform.h>
#include <string.h>
#include <target.h>
/* saved boot arguments from whoever loaded the system */
ulong lk_boot_args[4];