[includes] replace header guards with #pragma once

This commit is contained in:
Travis Geiselbrecht
2019-07-06 14:02:47 -07:00
parent d10eb9a8f6
commit 3aecdda231
143 changed files with 146 additions and 544 deletions

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __APP_H #pragma once
#define __APP_H
#include <stddef.h> #include <stddef.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -40,5 +39,3 @@ struct app_descriptor {
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ARCH_H #pragma once
#define __ARCH_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <sys/types.h> #include <sys/types.h>
@@ -24,4 +23,3 @@ __END_CDECLS
/* arch specific bits */ /* arch specific bits */
#include <arch/defines.h> #include <arch/defines.h>
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ARCH_OPS_H #pragma once
#define __ARCH_OPS_H
#ifndef ASSEMBLY #ifndef ASSEMBLY
@@ -57,4 +56,3 @@ __END_CDECLS
#include <arch/arch_ops.h> #include <arch/arch_ops.h>
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ARCH_THREAD_H #pragma once
#define __ARCH_THREAD_H
// give the arch code a chance to declare the arch_thread struct // give the arch code a chance to declare the arch_thread struct
#include <arch/arch_thread.h> #include <arch/arch_thread.h>
@@ -16,4 +15,3 @@ struct thread;
void arch_thread_initialize(struct thread *); void arch_thread_initialize(struct thread *);
void arch_context_switch(struct thread *oldthread, struct thread *newthread); void arch_context_switch(struct thread *oldthread, struct thread *newthread);
#endif

View File

@@ -5,8 +5,8 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_ACCELEROMETER_H #pragma once
#define __DEV_ACCELEROMETER_H
typedef struct { typedef struct {
double x; double x;
double y; double y;
@@ -15,4 +15,3 @@ typedef struct {
status_t acc_read_xyz(position_vector_t *pos_vector); status_t acc_read_xyz(position_vector_t *pos_vector);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_BLOCK_H #pragma once
#define __DEV_CLASS_BLOCK_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <dev/driver.h> #include <dev/driver.h>
@@ -34,5 +33,3 @@ status_t class_block_flush(struct device *dev);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_FB_H #pragma once
#define __DEV_CLASS_FB_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <dev/driver.h> #include <dev/driver.h>
@@ -38,6 +37,3 @@ status_t class_fb_update_region(struct device *dev, size_t x, size_t y, size_t w
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_I2C_H #pragma once
#define __DEV_CLASS_I2C_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <dev/driver.h> #include <dev/driver.h>
@@ -31,4 +30,3 @@ status_t class_i2c_read_reg(struct device *dev, uint8_t addr, uint8_t reg, void
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_NETIF_H #pragma once
#define __DEV_CLASS_NETIF_H
#include <lk/list.h> #include <lk/list.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -47,5 +46,3 @@ status_t class_netstack_wait_for_network(lk_time_t timeout);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_SPI_H #pragma once
#define __DEV_CLASS_SPI_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <dev/driver.h> #include <dev/driver.h>
@@ -40,5 +39,3 @@ ssize_t class_spi_transaction(struct device *dev, struct spi_transaction *txn, s
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_CLASS_UART_H #pragma once
#define __DEV_CLASS_UART_H
#include <dev/driver.h> #include <dev/driver.h>
@@ -22,5 +21,3 @@ struct uart_ops {
ssize_t class_uart_read(struct device *dev, void *buf, size_t len); ssize_t class_uart_read(struct device *dev, void *buf, size_t len);
ssize_t class_uart_write(struct device *dev, const void *buf, size_t len); ssize_t class_uart_write(struct device *dev, const void *buf, size_t len);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_DISPLAY_H #pragma once
#define __DEV_DISPLAY_H
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
@@ -73,4 +72,3 @@ __NONNULL((1));
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_DRIVER_H #pragma once
#define __DEV_DRIVER_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/list.h> // for containerof #include <lk/list.h> // for containerof
@@ -117,5 +116,3 @@ status_t device_resume(struct device *dev);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_ETHERNET_H #pragma once
#define __DEV_ETHERNET_H
#include <sys/types.h> #include <sys/types.h>
@@ -22,4 +21,3 @@ int ethernet_send(void *data, unsigned length);
status_t ethernet_init(void); /* initialize the ethernet device */ status_t ethernet_init(void); /* initialize the ethernet device */
#endif

View File

@@ -25,9 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#pragma once
#ifndef __DEV_FBCON_H
#define __DEV_FBCON_H
#define FB_FORMAT_RGB565 0 #define FB_FORMAT_RGB565 0
@@ -46,4 +44,3 @@ struct fbcon_config {
void fbcon_setup(struct fbcon_config *cfg); void fbcon_setup(struct fbcon_config *cfg);
void fbcon_putc(char c); void fbcon_putc(char c);
#endif /* __DEV_FBCON_H */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_FLASH_NOR_H #pragma once
#define __DEV_FLASH_NOR_H
#include <sys/types.h> #include <sys/types.h>
@@ -21,5 +20,3 @@ struct flash_nor_bank {
const struct flash_nor_bank *flash_nor_get_bank(unsigned int bank); const struct flash_nor_bank *flash_nor_get_bank(unsigned int bank);
#endif

View File

@@ -26,9 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#pragma once
#ifndef __DEV_GPIO_H
#define __DEV_GPIO_H
enum gpio_flags { enum gpio_flags {
GPIO_INPUT = (1 << 0), GPIO_INPUT = (1 << 0),
@@ -50,4 +48,3 @@ int gpio_config(unsigned nr, unsigned flags);
void gpio_set(unsigned nr, unsigned on); void gpio_set(unsigned nr, unsigned on);
int gpio_get(unsigned nr); int gpio_get(unsigned nr);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __GPIO_I2C__ #pragma once
#define __GPIO_I2C__
#include <stdint.h> #include <stdint.h>
#include <dev/i2c.h> #include <dev/i2c.h>
@@ -38,4 +37,3 @@ status_t gpio_i2c_receive(int, uint8_t, void *, size_t);
status_t gpio_i2c_write_reg_bytes(int, uint8_t, uint8_t, const uint8_t *, size_t); status_t gpio_i2c_write_reg_bytes(int, uint8_t, uint8_t, const uint8_t *, size_t);
status_t gpio_i2c_read_reg_bytes(int, uint8_t, uint8_t, uint8_t *, size_t); status_t gpio_i2c_read_reg_bytes(int, uint8_t, uint8_t, uint8_t *, size_t);
#endif // __GPIO_I2C__

View File

@@ -28,9 +28,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#pragma once
#ifndef __DEV_GPIO_KEYPAD_H
#define __DEV_GPIO_KEYPAD_H
#include <sys/types.h> #include <sys/types.h>
@@ -53,4 +51,3 @@ struct gpio_keypad_info {
void gpio_keypad_init(struct gpio_keypad_info *kpinfo); void gpio_keypad_init(struct gpio_keypad_info *kpinfo);
#endif /* __DEV_GPIO_KEYPAD_H */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_I2C_H #pragma once
#define __DEV_I2C_H
#include <stdint.h> #include <stdint.h>
@@ -40,5 +39,3 @@ static inline status_t i2c_write_reg(int bus, uint8_t address, uint8_t reg, uint
static inline status_t i2c_read_reg(int bus, uint8_t address, uint8_t reg, uint8_t *val) { static inline status_t i2c_read_reg(int bus, uint8_t address, uint8_t reg, uint8_t *val) {
return i2c_read_reg_bytes(bus, address, reg, val, 1); return i2c_read_reg_bytes(bus, address, reg, val, 1);
} }
#endif

View File

@@ -29,8 +29,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef __DEV_KEYS_H #pragma once
#define __DEV_KEYS_H
#include <sys/types.h> #include <sys/types.h>
@@ -86,4 +85,3 @@ void keys_init(void);
void keys_post_event(uint16_t code, int16_t value); void keys_post_event(uint16_t code, int16_t value);
int keys_get_state(uint16_t code); int keys_get_state(uint16_t code);
#endif /* __DEV_KEYS_H */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PCI_H #pragma once
#define __PCI_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -163,4 +162,3 @@ int pci_write_config_word(const pci_location_t *state, uint32_t reg, uint32_t va
int pci_get_irq_routing_options(irq_routing_entry *entries, uint16_t *count, uint16_t *pci_irqs); int pci_get_irq_routing_options(irq_routing_entry *entries, uint16_t *count, uint16_t *pci_irqs);
int pci_set_irq_hw_int(const pci_location_t *state, uint8_t int_pin, uint8_t irq); int pci_set_irq_hw_int(const pci_location_t *state, uint8_t int_pin, uint8_t irq);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_UART_H #pragma once
#define __DEV_UART_H
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
@@ -24,5 +23,3 @@ void uart_init_port(int port, uint baud);
int uart_pputc(int port, char c); int uart_pputc(int port, char c);
int uart_pgetc(int port); int uart_pgetc(int port);
#endif

View File

@@ -26,8 +26,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef __DEV_UDC_H #pragma once
#define __DEV_UDC_H
#include <stdint.h> #include <stdint.h>
@@ -91,4 +90,3 @@ int udc_register_gadget(udc_gadget_t *gadget);
int udc_start(void); int udc_start(void);
int udc_stop(void); int udc_stop(void);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_USB_H #pragma once
#define __DEV_USB_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -82,5 +81,3 @@ status_t usb_register_callback(usb_callback_t, void *cookie);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __DEV_USBC_H #pragma once
#define __DEV_USBC_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <stdbool.h> #include <stdbool.h>
@@ -73,5 +72,3 @@ static inline void usbc_dump_transfer(const usbc_transfer_t *t) {
__END_CDECLS __END_CDECLS
#endif

View File

@@ -6,8 +6,7 @@
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __HW_MII_H #pragma once
#define __HW_MII_H
#define MII_REG_BCR 0x00 #define MII_REG_BCR 0x00
#define MII_REG_BSR 0x01 #define MII_REG_BSR 0x01
@@ -56,5 +55,3 @@
#define MII_100TX_MODE_ISOLATE 0x001C #define MII_100TX_MODE_ISOLATE 0x001C
#define MII_100TX_SQE_TEST 0x0002 #define MII_100TX_SQE_TEST 0x0002
#define MII_100TX_NO_SCRAMBLE 0x0001 #define MII_100TX_NO_SCRAMBLE 0x0001
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __HW_USB_H #pragma once
#define __HW_USB_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -86,6 +85,3 @@ struct usb_setup {
uint16_t index; uint16_t index;
uint16_t length; uint16_t length;
} __PACKED; } __PACKED;
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_CONSOLE_H #pragma once
#define __LIB_CONSOLE_H
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
@@ -91,4 +90,3 @@ void panic_shell_start(void);
extern int lastresult; extern int lastresult;
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_H #pragma once
#define __PLATFORM_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -71,4 +70,3 @@ void platform_quiesce(void);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_DEBUG_H #pragma once
#define __PLATFORM_DEBUG_H
#include <sys/types.h> #include <sys/types.h>
#include <stdbool.h> #include <stdbool.h>
@@ -23,6 +22,3 @@ void platform_pputc(char c);
int platform_pgetc(char *c, bool wait); int platform_pgetc(char *c, bool wait);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_INTERRUPTS_H #pragma once
#define __PLATFORM_INTERRUPTS_H
#include <sys/types.h> #include <sys/types.h>
@@ -16,5 +15,3 @@ status_t unmask_interrupt(unsigned int vector);
typedef enum handler_return (*int_handler)(void *arg); typedef enum handler_return (*int_handler)(void *arg);
void register_int_handler(unsigned int vector, int_handler handler, void *arg); void register_int_handler(unsigned int vector, int_handler handler, void *arg);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_TIMER_H #pragma once
#define __PLATFORM_TIMER_H
#include <sys/types.h> #include <sys/types.h>
@@ -19,5 +18,3 @@ status_t platform_set_oneshot_timer (platform_timer_callback callback, void *arg
void platform_stop_timer(void); void platform_stop_timer(void);
#endif #endif
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __SYS_TYPES_H #pragma once
#define __SYS_TYPES_H
#include <limits.h> #include <limits.h>
#include <stdint.h> #include <stdint.h>
@@ -62,4 +61,3 @@ typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t; typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t; typedef uint64_t u_int64_t;
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __TARGET_H #pragma once
#define __TARGET_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <stdbool.h> #include <stdbool.h>
@@ -33,4 +32,3 @@ void target_set_debug_led(unsigned int led, bool on);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_DEBUG_H #pragma once
#define __KERNEL_DEBUG_H
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -55,6 +54,3 @@ enum {
#define KEVLOG_IRQ_EXIT(irqn) kernel_evlog_add(KERNEL_EVLOG_IRQ_EXIT, (uintptr_t)irqn, 0) #define KEVLOG_IRQ_EXIT(irqn) kernel_evlog_add(KERNEL_EVLOG_IRQ_EXIT, (uintptr_t)irqn, 0)
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_EVENT_H #pragma once
#define __KERNEL_EVENT_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <stdbool.h> #include <stdbool.h>
@@ -65,6 +64,3 @@ static inline status_t event_wait(event_t *e) {
} }
__END_CDECLS __END_CDECLS
#endif

View File

@@ -6,8 +6,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_MUTEX_H #pragma once
#define __KERNEL_MUTEX_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <lk/debug.h> #include <lk/debug.h>
@@ -53,5 +52,3 @@ static bool is_mutex_held(mutex_t *m) {
} }
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_NOVM_H #pragma once
#define __KERNEL_NOVM_H
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
@@ -36,5 +35,3 @@ struct page_range {
}; };
int novm_get_arenas(struct page_range *ranges, int number_of_ranges); int novm_get_arenas(struct page_range *ranges, int number_of_ranges);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_PORT_H #pragma once
#define __KERNEL_PORT_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -89,6 +88,3 @@ status_t port_destroy(port_t port);
status_t port_close(port_t port); status_t port_close(port_t port);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -14,8 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef __KERNEL_SEMAPHORE_H #pragma once
#define __KERNEL_SEMAPHORE_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <kernel/thread.h> #include <kernel/thread.h>
@@ -46,4 +45,3 @@ status_t sem_trywait(semaphore_t *);
status_t sem_timedwait(semaphore_t *, lk_time_t); status_t sem_timedwait(semaphore_t *, lk_time_t);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_THREAD_H #pragma once
#define __KERNEL_THREAD_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/list.h> #include <lk/list.h>
@@ -234,5 +233,3 @@ extern struct thread_stats thread_stats[SMP_MAX_CPUS];
#endif #endif
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_TIMER_H #pragma once
#define __KERNEL_TIMER_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <lk/list.h> #include <lk/list.h>
@@ -54,6 +53,3 @@ void timer_set_periodic(timer_t *, lk_time_t period, timer_callback, void *arg);
void timer_cancel(timer_t *); void timer_cancel(timer_t *);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_WAIT_H #pragma once
#define __KERNEL_WAIT_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/list.h> #include <lk/list.h>
@@ -67,6 +66,3 @@ int wait_queue_wake_all(wait_queue_t *, bool reschedule, status_t wait_queue_err
status_t thread_unblock_from_wait_queue(struct thread *t, status_t wait_queue_error); status_t thread_unblock_from_wait_queue(struct thread *t, status_t wait_queue_error);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_BUILDSIG_H #pragma once
#define __LIB_BUILDSIG_H
#include <stddef.h> #include <stddef.h>
#include <sys/types.h> #include <sys/types.h>
@@ -18,5 +17,3 @@ status_t buildsig_search(const void *ptr, size_t search_len, size_t max_len,
#define DEFAULT_BUILDSIG_SEARCH_LEN 1024 #define DEFAULT_BUILDSIG_SEARCH_LEN 1024
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __BYTES_H #pragma once
#define __BYTES_H
#include <endian.h> #include <endian.h>
#include <stdint.h> #include <stdint.h>
@@ -54,5 +53,3 @@ uint16_t bytes_swap_bits_u16(uint16_t val);
uint32_t bytes_swap_bits_u24(uint32_t val); uint32_t bytes_swap_bits_u24(uint32_t val);
uint32_t bytes_swap_bits_u32(uint32_t val); uint32_t bytes_swap_bits_u32(uint32_t val);
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef _DEVICETREE_H_
#define _DEVICETREE_H_
#include <sys/types.h> #include <sys/types.h>
@@ -46,5 +44,3 @@ int dt_walk(devicetree_t *dt, dt_node_cb ncb, dt_prop_cb pcb, void *cookie);
u32 dt_rd32(u8 *data); u32 dt_rd32(u8 *data);
void dt_wr32(u32 n, u8 *data); void dt_wr32(u32 n, u8 *data);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __KERNEL_DPC_H #pragma once
#define __KERNEL_DPC_H
#include <lk/list.h> #include <lk/list.h>
#include <sys/types.h> #include <sys/types.h>
@@ -17,5 +16,3 @@ typedef void (*dpc_callback)(void *arg);
status_t dpc_queue(dpc_callback, void *arg, uint flags); status_t dpc_queue(dpc_callback, void *arg, uint flags);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_EVLOG_H #pragma once
#define __LIB_EVLOG_H
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
@@ -42,5 +41,3 @@ void evlog_add2(evlog_t *e, uintptr_t a, uintptr_t b)
} }
*/ */
#endif

View File

@@ -6,8 +6,7 @@
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
/* derived from a font by Brian Swetland ages ago */ /* derived from a font by Brian Swetland ages ago */
#ifndef __FONT_H #pragma once
#define __FONT_H
static const unsigned char FONT[] = { static const unsigned char FONT[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ' ' */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ' ' */
@@ -140,5 +139,3 @@ static const unsigned char FONT[] = {
0x00, 0x00, 0x00, 0x08, 0x08, 0x14, 0x14, 0x22, 0x3e, 0x00, 0x00, 0x00, /* '' */ 0x00, 0x00, 0x00, 0x08, 0x08, 0x14, 0x14, 0x22, 0x3e, 0x00, 0x00, 0x00, /* '' */
}; };
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_FONT_H #pragma once
#define __LIB_FONT_H
#include <lib/gfx.h> #include <lib/gfx.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -20,5 +19,3 @@ void font_draw_char(gfx_surface *surface, unsigned char c, int x, int y, uint32_
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef __EXT2_PRIV_H
#define __EXT2_PRIV_H
#include <lib/bio.h> #include <lib/bio.h>
#include <lib/bcache.h> #include <lib/bcache.h>
@@ -80,5 +78,3 @@ status_t ext2_stat_file(filecookie *fcookie, struct file_stat *);
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) #define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef __FAT32_H
#define __FAT32_H
#include <lib/bio.h> #include <lib/bio.h>
#include <lib/fs.h> #include <lib/fs.h>
@@ -23,5 +21,3 @@ ssize_t fat32_read_file(filecookie *fcookie, void *buf, off_t offset, size_t len
status_t fat32_close_file(filecookie *fcookie); status_t fat32_close_file(filecookie *fcookie);
status_t fat32_stat_file(filecookie *fcookie, struct file_stat *stat); status_t fat32_stat_file(filecookie *fcookie, struct file_stat *stat);
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef _FAT_FS_H
#define _FAT_FS_H
#include <lib/bio.h> #include <lib/bio.h>
#include <lib/bcache.h> #include <lib/bcache.h>
@@ -58,4 +56,3 @@ typedef enum {
#define fat_read16(buffer,off) \ #define fat_read16(buffer,off) \
(((uint8_t *)buffer)[(off)] + (((uint8_t *)buffer)[(off)+1] << 8)) (((uint8_t *)buffer)[(off)] + (((uint8_t *)buffer)[(off)+1] << 8))
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef LIB_FS_SPIFS_H_
#define LIB_FS_SPIFS_H_
#include <lib/fs.h> #include <lib/fs.h>
@@ -18,4 +16,3 @@ typedef struct {
uint32_t toc_pages; uint32_t toc_pages;
} spifs_format_args_t; } spifs_format_args_t;
#endif // LIB_FS_SPIFS_H_

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_GFX_H #pragma once
#define __LIB_GFX_H
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
@@ -103,5 +102,3 @@ void gfx_draw_pattern(void);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,13 +5,10 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_GFXCONSOLE_H #pragma once
#define __LIB_GFXCONSOLE_H
#include <lib/gfx.h> #include <lib/gfx.h>
void gfxconsole_start_on_display(void); void gfxconsole_start_on_display(void);
void gfxconsole_start(gfx_surface *surface); void gfxconsole_start(gfx_surface *surface);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_PAGE_ALLOC_H #pragma once
#define __LIB_PAGE_ALLOC_H
#include <stddef.h> #include <stddef.h>
#include <sys/types.h> #include <sys/types.h>
@@ -50,5 +49,3 @@ int page_get_arenas(struct page_range *ranges, int number_of_ranges);
void *page_first_alloc(size_t *size_return); void *page_first_alloc(size_t *size_return);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ASSERT_H #pragma once
#define __ASSERT_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <lk/debug.h> #include <lk/debug.h>
@@ -28,4 +27,3 @@
#define static_assert(e) STATIC_ASSERT(e) #define static_assert(e) STATIC_ASSERT(e)
#endif #endif
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __CTYPE_H #pragma once
#define __CTYPE_H
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -30,5 +29,3 @@ int toupper(int c);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ENDIAN_H #pragma once
#define __ENDIAN_H
#include <sys/types.h> #include <sys/types.h>
@@ -77,5 +76,3 @@
#define WRITE_MEM_BYTE(ptr, data) (*(byte *)(ptr) = (data)) #define WRITE_MEM_BYTE(ptr, data) (*(byte *)(ptr) = (data))
#endif #endif
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __ERRNO_H #pragma once
#define __ERRNO_H
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -145,4 +144,3 @@ extern int *__geterrno(void);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,13 +5,10 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __INTTYPES_H #pragma once
#define __INTTYPES_H
#define PRIu32 "u" #define PRIu32 "u"
#define PRIx32 "x" #define PRIx32 "x"
#include <stdint.h> #include <stdint.h>
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __IOVEC_H #pragma once
#define __IOVEC_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <stddef.h> #include <stddef.h>
@@ -26,5 +25,3 @@ ssize_t iovec_to_membuf(uint8_t *buf, uint buf_len,
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MALLOC_H #pragma once
#define __MALLOC_H
#include <sys/types.h> #include <sys/types.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -15,5 +14,3 @@
/* lib/heap provides malloc/free definitions */ /* lib/heap provides malloc/free definitions */
#include <lib/heap.h> #include <lib/heap.h>
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __NEW_H #pragma once
#define __NEW_H
#include <sys/types.h> #include <sys/types.h>
@@ -17,4 +16,3 @@ void *operator new[](size_t, void *ptr);
void operator delete (void *p); void operator delete (void *p);
void operator delete[](void *p); void operator delete[](void *p);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_PRINTF_H #pragma once
#define __LIB_PRINTF_H
#include <stdarg.h> #include <stdarg.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -26,4 +25,3 @@ int _printf_engine(_printf_engine_output_func out, void *state, const char *fmt,
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __RAND_H #pragma once
#define __RAND_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <sys/types.h> #include <sys/types.h>
@@ -21,5 +20,3 @@ void rand_add_entropy(const void *buf, size_t len);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __STDINT_H #pragma once
#define __STDINT_H
#include <limits.h> // for ULONG_MAX #include <limits.h> // for ULONG_MAX
@@ -124,5 +123,3 @@ typedef unsigned long long uintmax_t;
#define INTMAX_C(c) INT64_C(c) #define INTMAX_C(c) INT64_C(c)
#define UINTMAX_C(c) UINT64_C(c) #define UINTMAX_C(c) UINT64_C(c)
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __STDIO_H #pragma once
#define __STDIO_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <printf.h> #include <printf.h>
@@ -71,5 +70,3 @@ int vsnprintf(char *str, size_t len, const char *fmt, va_list ap);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __STDLIB_H #pragma once
#define __STDLIB_H
#include <lk/compiler.h> #include <lk/compiler.h>
#include <sys/types.h> #include <sys/types.h>
@@ -48,5 +47,3 @@ char *getenv(const char *name);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_STRING_H #pragma once
#define __LIB_STRING_H
#include <stddef.h> #include <stddef.h>
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -49,4 +48,3 @@ size_t strnlen(char const *s, size_t count) __PURE;
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef _NET_PKTBUF_H_
#define _NET_PKTBUF_H_
#include <sys/types.h> #include <sys/types.h>
#include <lk/list.h> #include <lk/list.h>
@@ -106,4 +104,3 @@ void pktbuf_create(void *ptr, size_t size);
void pktbuf_create_bufs(void *ptr, size_t size); void pktbuf_create_bufs(void *ptr, size_t size);
void pktbuf_dump(pktbuf_t *p); void pktbuf_dump(pktbuf_t *p);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __NORFS_H #pragma once
#define __NORFS_H
#include <iovec.h> #include <iovec.h>
#include <sys/types.h> #include <sys/types.h>
@@ -62,4 +61,3 @@ status_t norfs_read_obj(uint32_t key, unsigned char *buffer, uint16_t buffer_len
*/ */
void norfs_wipe_fs(void); void norfs_wipe_fs(void);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __NORFS_CONFIG_H #pragma once
#define __NORFS_CONFIG_H
#include <platform/flash_nor_config.h> #include <platform/flash_nor_config.h>
@@ -30,4 +29,3 @@
#define NORFS_DELETED_MASK 1 #define NORFS_DELETED_MASK 1
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __NORFS_INODE_H #pragma once
#define __NORFS_INODE_H
#include <lk/list.h> #include <lk/list.h>
#include <stdint.h> #include <stdint.h>
@@ -17,4 +16,3 @@ struct norfs_inode {
uint32_t reference_count; uint32_t reference_count;
}; };
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __NORFS_TEST_HELPER_H #pragma once
#define __NORFS_TEST_HELPER_H
#include <stddef.h> #include <stddef.h>
#include <sys/types.h> #include <sys/types.h>
@@ -24,4 +23,3 @@ void wipe_fs(void);
status_t collect_block(uint32_t garbage_block, uint32_t *garbage_write_ptr); status_t collect_block(uint32_t garbage_block, uint32_t *garbage_write_ptr);
bool get_inode(uint32_t key, struct norfs_inode **inode); bool get_inode(uint32_t key, struct norfs_inode **inode);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_PARTITION_H #pragma once
#define __LIB_PARTITION_H
#include <sys/types.h> #include <sys/types.h>
@@ -16,5 +15,3 @@ int partition_publish(const char *device, off_t offset);
/* remove any published subdevices on this device */ /* remove any published subdevices on this device */
int partition_unpublish(const char *device); int partition_unpublish(const char *device);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_TEXT_H #pragma once
#define __LIB_TEXT_H
#include <lib/font.h> #include <lib/font.h>
@@ -17,5 +16,3 @@ void text_draw(int x, int y, const char *string);
/* super dumb, someone has to call this to refresh everything */ /* super dumb, someone has to call this to refresh everything */
void text_update(void); void text_update(void);
#endif

View File

@@ -5,13 +5,10 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_TGA_H #pragma once
#define __LIB_TGA_H
#include <lib/gfx.h> #include <lib/gfx.h>
#include <sys/types.h> #include <sys/types.h>
gfx_surface *tga_decode(const void *ptr, size_t len, gfx_format format); gfx_surface *tga_decode(const void *ptr, size_t len, gfx_format format);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef _LIB_UNITTEST_INCLUDE_UNITTEST_H_ #pragma once
#define _LIB_UNITTEST_INCLUDE_UNITTEST_H_
/* /*
* Macros for writing unit tests. * Macros for writing unit tests.
* *
@@ -286,5 +285,3 @@ bool run_all_tests(void);
*/ */
bool expect_bytes_eq(const uint8_t *expected, const uint8_t *actual, size_t len, bool expect_bytes_eq(const uint8_t *expected, const uint8_t *actual, size_t len,
const char *msg); const char *msg);
#endif /* _LIB_UNITTEST_INCLUDE_UNITTEST_H_ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __LIB_VERSION_H #pragma once
#define __LIB_VERSION_H
#include <lk/compiler.h> #include <lk/compiler.h>
@@ -29,5 +28,3 @@ void print_version(void);
__END_CDECLS __END_CDECLS
#endif

View File

@@ -5,9 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef __LIB_WATCHDOG_H__
#define __LIB_WATCHDOG_H__
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
@@ -66,5 +64,3 @@ extern void platform_watchdog_pet(void);
status_t watchdog_hw_init(lk_time_t timeout); status_t watchdog_hw_init(lk_time_t timeout);
void watchdog_hw_set_enabled(bool enabled); void watchdog_hw_set_enabled(bool enabled);
#endif // __LIB_WATCHDOG_H__

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_ARMEMU_H #pragma once
#define __PLATFORM_ARMEMU_H
#include <platform/armemu/memmap.h> #include <platform/armemu/memmap.h>
@@ -18,5 +17,3 @@ void debug_dump_memory_words(void *mem, int len);
void debug_set_trace_level(int trace_type, int level); void debug_set_trace_level(int trace_type, int level);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MEMMAP_H #pragma once
#define __MEMMAP_H
#define MEMBANK_SIZE (4*1024*1024) #define MEMBANK_SIZE (4*1024*1024)
@@ -157,4 +156,3 @@
#define BDEV_CMD_ERR_GENERAL (1 << BDEV_CMD_ERRSHIFT) #define BDEV_CMD_ERR_GENERAL (1 << BDEV_CMD_ERRSHIFT)
#define BDEV_CMD_ERR_BAD_OFFSET (2 << BDEV_CMD_ERRSHIFT) #define BDEV_CMD_ERR_BAD_OFFSET (2 << BDEV_CMD_ERRSHIFT)
#endif

View File

@@ -5,13 +5,10 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __PLATFORM_P_H #pragma once
#define __PLATFORM_P_H
void platform_init_interrupts(void); void platform_init_interrupts(void);
void platform_init_timer(void); void platform_init_timer(void);
void platform_init_blkdev(void); void platform_init_blkdev(void);
void platform_init_display(void); void platform_init_display(void);
#endif

View File

@@ -6,9 +6,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef __PRIVATE_UDC_H__
#define __PRIVATE_UDC_H__
#define GET_STATUS 0 #define GET_STATUS 0
#define CLEAR_FEATURE 1 #define CLEAR_FEATURE 1
@@ -71,4 +69,3 @@ udc_descriptor_t *udc_descriptor_find(unsigned tag);
// driver provides this // driver provides this
void udc_ept_desc_fill(udc_endpoint_t *ept, unsigned char *data); void udc_ept_desc_fill(udc_endpoint_t *ept, unsigned char *data);
#endif

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef _MT_GIC_H_ #pragma once
#define _MT_GIC_H_
#include "platform/mt_irq.h" #include "platform/mt_irq.h"
@@ -33,5 +32,3 @@ void platform_init_interrupts(void);
void platform_deinit_interrupts(void); void platform_deinit_interrupts(void);
void mt_irq_register_dump(void); void mt_irq_register_dump(void);
#endif /* !_MT_GIC_H_ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __SYNC_WRITE_H__ #pragma once
#define __SYNC_WRITE_H__
#include <arch/arm.h> #include <arch/arm.h>
@@ -30,5 +29,3 @@
dsb(); \ dsb(); \
} while (0) } while (0)
#endif /* !__SYNC_WRITE_H__ */

View File

@@ -5,8 +5,8 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MT_GPT_H__ #pragma once
#define __MT_GPT_H__
#include <platform/mt_typedefs.h> #include <platform/mt_typedefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdbool.h> #include <stdbool.h>
@@ -53,4 +53,3 @@
extern void gpt_init(void); extern void gpt_init(void);
#endif /* !__MT_GPT_H__ */

View File

@@ -32,9 +32,7 @@
* have been modified by MediaTek Inc. All revisions are subject to any receiver's * have been modified by MediaTek Inc. All revisions are subject to any receiver's
* applicable license agreements with MediaTek Inc. * applicable license agreements with MediaTek Inc.
*/ */
#pragma once
#ifndef __MT_IRQ_H__
#define __MT_IRQ_H__
#define GIC_CPU_CTRL 0x00 #define GIC_CPU_CTRL 0x00
#define GIC_CPU_PRIMASK 0x04 #define GIC_CPU_PRIMASK 0x04
@@ -116,4 +114,3 @@ void mt_irq_ack(unsigned int irq);
void platform_init_interrupts(void); void platform_init_interrupts(void);
#endif

View File

@@ -11,8 +11,7 @@
* and * and
* https://github.com/alexgoussev/AP7350_MDK-kernel * https://github.com/alexgoussev/AP7350_MDK-kernel
*/ */
#ifndef __MT_REG_BASE_H__ #pragma once
#define __MT_REG_BASE_H__
#define BOOTROM_BASE (0x00000000) #define BOOTROM_BASE (0x00000000)
#define BOOTSRAM_BASE (0x00100000) #define BOOTSRAM_BASE (0x00100000)
@@ -622,4 +621,3 @@
//////////////////////////////////////// ////////////////////////////////////////
#endif /* !__MT_REG_BASE_H__ */

View File

@@ -9,9 +9,7 @@
/* ------------ /* ------------
* Type definition. * Type definition.
*/ */
#pragma once
#ifndef __MT_TYPEDEFS_H__
#define __MT_TYPEDEFS_H__
/*==== CONSTANTS ==================================================*/ /*==== CONSTANTS ==================================================*/
@@ -145,4 +143,3 @@ typedef signed long long S64;
#define DRV_SetReg32(addr, data) SETREG32(addr, data) #define DRV_SetReg32(addr, data) SETREG32(addr, data)
#define DRV_ClrReg32(addr, data) CLRREG32(addr, data) #define DRV_ClrReg32(addr, data) CLRREG32(addr, data)
#endif /* !__MT_TYPEDEFS_H__ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef ___MTK_UART_H__ #pragma once
#define ___MTK_UART_H__
#include <platform/mt_reg_base.h> #include <platform/mt_reg_base.h>
@@ -202,4 +201,3 @@ control */
extern void mtk_set_current_uart(MTK_UART uart_base); extern void mtk_set_current_uart(MTK_UART uart_base);
extern int mtk_get_current_uart(void); extern int mtk_get_current_uart(void);
#endif /* !___MTK_UART_H__ */

View File

@@ -5,8 +5,8 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MT_GPT_H__ #pragma once
#define __MT_GPT_H__
#include <platform/mt_typedefs.h> #include <platform/mt_typedefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdbool.h> #include <stdbool.h>
@@ -53,4 +53,3 @@
extern void gpt_init(void); extern void gpt_init(void);
#endif /* !__MT_GPT_H__ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MT_IRQ_H__ #pragma once
#define __MT_IRQ_H__
#include <stdint.h> #include <stdint.h>
@@ -55,4 +54,3 @@
#define MT65xx_POLARITY_LOW 0 #define MT65xx_POLARITY_LOW 0
#define MT65xx_POLARITY_HIGH 1 #define MT65xx_POLARITY_HIGH 1
#endif /* !__MT_IRQ_H__ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef __MT_REG_BASE_H__ #pragma once
#define __MT_REG_BASE_H__
#define BOOTROM_BASE (0x00000000) #define BOOTROM_BASE (0x00000000)
#define BOOTSRAM_BASE (0x00100000) #define BOOTSRAM_BASE (0x00100000)
@@ -494,5 +493,3 @@
//////////////////////////////////////// ////////////////////////////////////////
#endif /* !__MT_REG_BASE_H__ */

View File

@@ -10,8 +10,7 @@
* Type definition. * Type definition.
*/ */
#ifndef __MT_TYPEDEFS_H__ #pragma once
#define __MT_TYPEDEFS_H__
/*==== CONSTANTS ==================================================*/ /*==== CONSTANTS ==================================================*/
@@ -145,5 +144,3 @@ typedef signed long long S64;
#define DRV_SetReg32(addr, data) SETREG32(addr, data) #define DRV_SetReg32(addr, data) SETREG32(addr, data)
#define DRV_ClrReg32(addr, data) CLRREG32(addr, data) #define DRV_ClrReg32(addr, data) CLRREG32(addr, data)
#endif /* !__MT_TYPEDEFS_H__ */

View File

@@ -5,8 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#ifndef ___MTK_UART_H__ #pragma once
#define ___MTK_UART_H__
#include <platform/mt_reg_base.h> #include <platform/mt_reg_base.h>
@@ -202,5 +201,3 @@ control */
extern void mtk_set_current_uart(MTK_UART uart_base); extern void mtk_set_current_uart(MTK_UART uart_base);
extern int mtk_get_current_uart(void); extern int mtk_get_current_uart(void);
#endif /* !___MTK_UART_H__ */

View File

@@ -5,10 +5,7 @@
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT * https://opensource.org/licenses/MIT
*/ */
#pragma once
#ifndef __PLATFORM_NRF51_GPIO_H
#define __PLATFORM_NRF51_GPIO_H
#define NRF_MAX_PIN_NUMBER 31 #define NRF_MAX_PIN_NUMBER 31
#endif

Some files were not shown because too many files have changed in this diff Show More