# All of the exports in this file are platform independent. This includes
# truly platform independent pieces, as well as arch-specific but interface
# platform independent pieces (like basic timers). Truly arch-specific
# things will go in another file (kernel/arch/xxx/exports.txt).

# Libc ###############################

include assert.h
include malloc.h
include stdlib.h
include stdio.h
include strings.h

# Malloc
malloc
calloc
free
realloc
memalign
valloc
mallinfo
malloc_stats
malloc_irq_safe
mem_check_block
mem_check_all

# Stdio
printf
fopen
fread
fwrite
fseek
fclose
fdopen
ftell
fflush
rewind
fputc
dbglog
sprintf
vsprintf

# Stdlib
__assert
abort
exit

# String
memset
memcmp
memcpy
strcat
strncat
strcasecmp
strncasecmp
strcpy
strlen

# Misc
abs
# __error

######################################

include kos.h

# Name Manager
nmmgr_lookup
nmmgr_get_list
nmmgr_handler_add
nmmgr_handler_remove

# File System
elf_load
elf_free
fs_open
fs_close
fs_read
fs_write
fs_seek
fs_seek64
fs_tell
fs_tell64
fs_total
fs_total64
fs_readdir
fs_rewinddir
fs_ioctl
fs_fcntl
fs_rename
fs_unlink
fs_chdir
fs_getwd
fs_mmap
fs_complete
fs_stat
fs_fstat
fs_mkdir
fs_rmdir
fs_link
fs_symlink
fs_readlink
fs_dup
fs_dup2
fs_open_handle
fs_get_handler
fs_get_handle
fs_copy
fs_load
fs_path_append
fs_normalize_path

# FS helpers
fs_pty_create
fs_romdisk_mount
fs_romdisk_unmount

# Network Core
net_reg_device
net_unreg_device
net_input
net_input_set_target
net_get_if_list

# Threads
cond_create
cond_destroy
cond_wait_timed
cond_wait
cond_signal
cond_broadcast
genwait_wait
genwait_wake_cnt
genwait_wake_all
genwait_wake_one
mutex_create
mutex_destroy
mutex_lock
mutex_lock_timed
mutex_trylock
mutex_is_locked
mutex_unlock
sem_create
sem_destroy
sem_wait
sem_wait_timed
sem_trywait
sem_signal
sem_count
thd_pslist
thd_pslist_queue
thd_by_tid
thd_exit
thd_create
thd_destroy
thd_set_prio
thd_schedule
thd_schedule_next
thd_sleep
thd_pass
thd_join
thd_detach
thd_get_label
thd_set_label
thd_get_current
thd_get_pwd
thd_set_pwd
thd_get_errno
thd_set_mode
thd_block_now

# Libraries
#library_print_list
#library_by_libid
#library_exit
#library_create
#library_destroy
#library_get_libid
#library_get_refcnt
#library_open
#library_close

# Cache management
icache_flush_range
dcache_inval_range
dcache_flush_range
dcache_purge_range
dcache_purge_all

# Low-level debug I/O
dbgio_set_irq_usage
dbgio_enable
dbgio_disable
dbgio_dev_select
dbgio_dev_get
dbgio_write
dbgio_flush
dbgio_write_buffer
dbgio_write_buffer_xlat
dbgio_write_str
dbgio_read
dbgio_read_buffer
dbgio_printf

# Interrupt / Exception handling
irq_force_return
irq_disable
irq_enable
irq_restore
irq_inside_int
irq_set_handler
irq_get_handler
irq_set_global_handler
irq_get_global_handler
irq_set_context
irq_get_context

# Kernel image replacement
arch_exec_at
arch_exec

# Misc other kernel control
arch_exit
arch_abort

# MMU handling
mmu_reset_itlb
mmu_use_table
mmu_context_create
mmu_context_destroy
mmu_virt_to_phys
mmu_switch_context
mmu_page_map
mmu_copyin
mmu_copyv
mmu_map_get_callback
mmu_map_set_callback
mmu_init
mmu_shutdown

# Panic!
arch_panic

# Real-time clock
rtc_unix_secs
rtc_boot_time

# Stack tracing
arch_stk_trace
arch_stk_trace_at

# Timers
timer_spin_sleep
timer_ms_gettime
timer_ms_gettime64
timer_us_gettime64
timer_primary_set_callback
timer_primary_wakeup
