Made C++ safe.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5075 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-10-17 14:42:45 +00:00
parent bd77051dc3
commit 50ba16fccf
4 changed files with 36 additions and 2 deletions

View File

@ -5,9 +5,15 @@
#ifndef _KERNEL_ELF_H #ifndef _KERNEL_ELF_H
#define _KERNEL_ELF_H #define _KERNEL_ELF_H
#include <thread.h> #include <thread.h>
#include <image.h> #include <image.h>
#ifdef __cplusplus
extern "C" {
#endif
int elf_load_uspace(const char *path, struct team *t, int flags, addr *entry); int elf_load_uspace(const char *path, struct team *t, int flags, addr *entry);
image_id elf_load_kspace(const char *path, const char *sym_prepend); image_id elf_load_kspace(const char *path, const char *sym_prepend);
int elf_unload_kspace(const char *path); int elf_unload_kspace(const char *path);
@ -15,4 +21,8 @@ addr elf_lookup_symbol(image_id id, const char *symbol);
int elf_lookup_symbol_address(addr address, addr *baseAddress, char *text, size_t length); int elf_lookup_symbol_address(addr address, addr *baseAddress, char *text, size_t length);
int elf_init(kernel_args *ka); int elf_init(kernel_args *ka);
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_ELF_H */ #endif /* _KERNEL_ELF_H */

View File

@ -9,13 +9,16 @@
#include <lock.h> #include <lock.h>
#include <memheap.h> #include <memheap.h>
#include <sys/stat.h> #include <sys/stat.h>
//#include <list.h>
#ifdef __cplusplus
extern "C" {
#endif
struct select_sync; struct select_sync;
struct fd_ops { struct fd_ops {
ssize_t (*fd_read) (struct file_descriptor *, off_t pos, void *buffer, size_t *length); ssize_t (*fd_read)(struct file_descriptor *, off_t pos, void *buffer, size_t *length);
ssize_t (*fd_write)(struct file_descriptor *, off_t pos, const void *buffer, size_t *length); ssize_t (*fd_write)(struct file_descriptor *, off_t pos, const void *buffer, size_t *length);
off_t (*fd_seek)(struct file_descriptor *, off_t pos, int seekType); off_t (*fd_seek)(struct file_descriptor *, off_t pos, int seekType);
status_t (*fd_ioctl)(struct file_descriptor *, ulong op, void *buffer, size_t length); status_t (*fd_ioctl)(struct file_descriptor *, ulong op, void *buffer, size_t length);
@ -84,4 +87,8 @@ get_current_io_context(bool kernel)
return (struct io_context *)thread_get_current_thread()->team->io_context; return (struct io_context *)thread_get_current_thread()->team->io_context;
} }
#ifdef __cplusplus
}
#endif
#endif /* _FD_H */ #endif /* _FD_H */

View File

@ -11,6 +11,10 @@
struct io_context; struct io_context;
#ifdef __cplusplus
extern "C" {
#endif
// private kernel API // private kernel API
extern status_t remove_node_monitors(struct io_context *context); extern status_t remove_node_monitors(struct io_context *context);
extern status_t node_monitor_init(void); extern status_t node_monitor_init(void);
@ -22,4 +26,8 @@ extern status_t user_start_watching(dev_t device, ino_t node, uint32 flags,
extern status_t user_stop_watching(dev_t device, ino_t node, uint32 flags, extern status_t user_stop_watching(dev_t device, ino_t node, uint32 flags,
port_id port, uint32 token); port_id port, uint32 token);
#ifdef __cplusplus
}
#endif
#endif /* _KRENEL_NODE_MONITOR_H */ #endif /* _KRENEL_NODE_MONITOR_H */

View File

@ -5,12 +5,17 @@
#ifndef _KERNEL_VM_CACHE_H #ifndef _KERNEL_VM_CACHE_H
#define _KERNEL_VM_CACHE_H #define _KERNEL_VM_CACHE_H
#include <kernel.h> #include <kernel.h>
#include <vm.h> #include <vm.h>
struct kernel_args; struct kernel_args;
#ifdef __cplusplus
extern "C" {
#endif
int vm_cache_init(struct kernel_args *ka); int vm_cache_init(struct kernel_args *ka);
vm_cache *vm_cache_create(vm_store *store); vm_cache *vm_cache_create(vm_store *store);
vm_cache_ref *vm_cache_ref_create(vm_cache *cache); vm_cache_ref *vm_cache_ref_create(vm_cache *cache);
@ -22,4 +27,8 @@ void vm_cache_remove_page(vm_cache_ref *cache_ref, vm_page *page);
int vm_cache_insert_region(vm_cache_ref *cache_ref, vm_region *region); int vm_cache_insert_region(vm_cache_ref *cache_ref, vm_region *region);
int vm_cache_remove_region(vm_cache_ref *cache_ref, vm_region *region); int vm_cache_remove_region(vm_cache_ref *cache_ref, vm_region *region);
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_VM_CACHE_H */ #endif /* _KERNEL_VM_CACHE_H */