Fixed some int/int32/status_t issues.
Also kernel/module.h was hidden by os/drivers/module.h - fixed; kernel/module.h is now called kmodule.h and only contains the module_init() function for the kernel. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1122 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
beb8d9fd79
commit
633275adee
@ -42,7 +42,7 @@ struct elf_image_info {
|
||||
struct elf_image_info *next;
|
||||
char *name;
|
||||
image_id id;
|
||||
int ref_count;
|
||||
int32 ref_count;
|
||||
void *vnode;
|
||||
struct elf_region regions[2]; // describes the text and data regions
|
||||
addr dynamic_ptr; // pointer to the dynamic section
|
||||
@ -280,9 +280,9 @@ dump_image_info(struct elf_image_info *image)
|
||||
|
||||
dprintf("elf_image_info at %p:\n", image);
|
||||
dprintf(" next %p\n", image->next);
|
||||
dprintf(" id 0x%x\n", image->id);
|
||||
dprintf(" id 0x%lx\n", image->id);
|
||||
for (i = 0; i < 2; i++) {
|
||||
dprintf(" regions[%d].id 0x%x\n", i, image->regions[i].id);
|
||||
dprintf(" regions[%d].id 0x%lx\n", i, image->regions[i].id);
|
||||
dprintf(" regions[%d].start 0x%lx\n", i, image->regions[i].start);
|
||||
dprintf(" regions[%d].size 0x%lx\n", i, image->regions[i].size);
|
||||
dprintf(" regions[%d].delta %ld\n", i, image->regions[i].delta);
|
||||
@ -662,7 +662,7 @@ elf_load_uspace(const char *path, struct team *p, int flags, addr *entry)
|
||||
goto error;
|
||||
}
|
||||
|
||||
dprintf("reading in program headers at 0x%x, len 0x%x\n", eheader.e_phoff, eheader.e_phnum * eheader.e_phentsize);
|
||||
dprintf("reading in program headers at 0x%lx, len 0x%x\n", eheader.e_phoff, eheader.e_phnum * eheader.e_phentsize);
|
||||
len = sys_read(fd, eheader.e_phoff, pheaders, eheader.e_phnum * eheader.e_phentsize);
|
||||
if (len < 0) {
|
||||
err = len;
|
||||
@ -880,7 +880,7 @@ elf_load_kspace(const char *path, const char *sym_prepend)
|
||||
image->dynamic_ptr = pheaders[i].p_vaddr;
|
||||
continue;
|
||||
default:
|
||||
dprintf("unhandled pheader type 0x%x\n", pheaders[i].p_type);
|
||||
dprintf("unhandled pheader type 0x%lx\n", pheaders[i].p_type);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -907,7 +907,7 @@ elf_load_kspace(const char *path, const char *sym_prepend)
|
||||
lock = LOCK_RW|LOCK_KERNEL;
|
||||
sprintf(region_name, "%s_ro", path);
|
||||
} else {
|
||||
dprintf("weird program header flags 0x%x\n", pheaders[i].p_flags);
|
||||
dprintf("weird program header flags 0x%lx\n", pheaders[i].p_flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ mutex_lock(mutex *mutex)
|
||||
thread_id me = thread_get_current_thread_id();
|
||||
|
||||
if (me == mutex->holder)
|
||||
panic("mutex_lock failure: mutex %p acquired twice by thread 0x%x\n", mutex, me);
|
||||
panic("mutex_lock failure: mutex %p acquired twice by thread 0x%lx\n", mutex, me);
|
||||
|
||||
acquire_sem(mutex->sem);
|
||||
mutex->holder = me;
|
||||
@ -144,7 +144,7 @@ mutex_unlock(mutex *mutex)
|
||||
thread_id me = thread_get_current_thread_id();
|
||||
|
||||
if (me != mutex->holder)
|
||||
panic("mutex_unlock failure: thread 0x%x is trying to release mutex %p (current holder 0x%x)\n",
|
||||
panic("mutex_unlock failure: thread 0x%lx is trying to release mutex %p (current holder 0x%lx)\n",
|
||||
me, mutex, mutex->holder);
|
||||
|
||||
mutex->holder = -1;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <beos.h>
|
||||
#include <devs.h>
|
||||
#include <bus.h>
|
||||
#include <module.h>
|
||||
#include <kmodule.h>
|
||||
#include <int.h>
|
||||
|
||||
#include <string.h>
|
||||
@ -150,8 +150,8 @@ static int main2(void *unused)
|
||||
{
|
||||
team_id pid;
|
||||
pid = team_create_team("/boot/bin/init", "init", NULL, 0, NULL, 0, 5);
|
||||
if(pid < 0)
|
||||
kprintf("error starting 'init' error = %d \n",pid);
|
||||
if (pid < 0)
|
||||
kprintf("error starting 'init' error = %ld \n", pid);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <module.h>
|
||||
#include <kmodule.h>
|
||||
#include <lock.h>
|
||||
#include <Errors.h>
|
||||
#include <arch/cpu.h>
|
||||
@ -216,7 +216,7 @@ load_module_file(const char *path)
|
||||
|
||||
if (file_image < 0 ) {
|
||||
SHOW_FLOW( 3, "couldn't load image %s (%s)\n", path, strerror(file_image));
|
||||
dprintf("load_module_file failed! returned %d\n", file_image);
|
||||
dprintf("load_module_file failed! returned %ld\n", file_image);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -880,7 +880,7 @@ open_module_list(const char *prefix)
|
||||
* Returns 0 if a module was available.
|
||||
*/
|
||||
|
||||
int
|
||||
status_t
|
||||
read_next_module_name(void *cookie, char *buf, size_t *bufsize)
|
||||
{
|
||||
module_iterator *iter = (module_iterator *)cookie;
|
||||
@ -920,7 +920,8 @@ read_next_module_name(void *cookie, char *buf, size_t *bufsize)
|
||||
}
|
||||
|
||||
|
||||
int close_module_list(void *cookie)
|
||||
status_t
|
||||
close_module_list(void *cookie)
|
||||
{
|
||||
module_iterator *iter = (module_iterator *)cookie;
|
||||
|
||||
@ -941,7 +942,8 @@ int close_module_list(void *cookie)
|
||||
/* module_init
|
||||
* setup module structures and data for use
|
||||
*/
|
||||
int module_init( kernel_args *ka, module_info **sys_module_headers )
|
||||
status_t
|
||||
module_init(kernel_args *ka, module_info **sys_module_headers)
|
||||
{
|
||||
SHOW_FLOW0( 0, "\n" );
|
||||
recursive_lock_create( &modules_lock );
|
||||
@ -966,8 +968,8 @@ int module_init( kernel_args *ka, module_info **sys_module_headers )
|
||||
}
|
||||
|
||||
|
||||
/* BeOS Compatibility... */
|
||||
int get_module(const char *path, module_info **vec)
|
||||
status_t
|
||||
get_module(const char *path, module_info **vec)
|
||||
{
|
||||
module *m = (module *)hash_get(modules_list, path, strlen(path));
|
||||
loaded_module *lm;
|
||||
@ -1031,7 +1033,9 @@ int get_module(const char *path, module_info **vec)
|
||||
return res;
|
||||
}
|
||||
|
||||
int put_module(const char *path)
|
||||
|
||||
status_t
|
||||
put_module(const char *path)
|
||||
{
|
||||
module *m = (module *)hash_get(modules_list, path, strlen(path));
|
||||
|
||||
|
@ -171,7 +171,7 @@ context_switch(struct thread *t_from, struct thread *t_to)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static int32
|
||||
reschedule_event(timer *unused)
|
||||
{
|
||||
// this function is called as a result of the timer event set by the scheduler
|
||||
@ -213,7 +213,7 @@ resched(void)
|
||||
break;
|
||||
case B_THREAD_SUSPENDED:
|
||||
#ifndef NEW_SCHEDULER
|
||||
dprintf("suspending thread 0x%x\n", old_thread->id);
|
||||
dprintf("suspending thread 0x%lx\n", old_thread->id);
|
||||
#else /* NEW_SCHEDULER */
|
||||
dprintf("resched(): suspending thread 0x%x\n", old_thread->id);
|
||||
#endif /* NEW_SCHEDULER */
|
||||
|
@ -313,19 +313,19 @@ int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_re
|
||||
*call_ret = user_setrlimit((int)arg0, (const struct rlimit *)arg1);
|
||||
break;
|
||||
case SYSCALL_ATOMIC_ADD:
|
||||
*call_ret = user_atomic_add((int *)arg0, (int)arg1);
|
||||
*call_ret = user_atomic_add((int32 *)arg0, (int32)arg1);
|
||||
break;
|
||||
case SYSCALL_ATOMIC_AND:
|
||||
*call_ret = user_atomic_and((int *)arg0, (int)arg1);
|
||||
*call_ret = user_atomic_and((int32 *)arg0, (int32)arg1);
|
||||
break;
|
||||
case SYSCALL_ATOMIC_OR:
|
||||
*call_ret = user_atomic_or((int *)arg0, (int)arg1);
|
||||
*call_ret = user_atomic_or((int32 *)arg0, (int32)arg1);
|
||||
break;
|
||||
case SYSCALL_ATOMIC_SET:
|
||||
*call_ret = user_atomic_set((int *)arg0, (int)arg1);
|
||||
*call_ret = user_atomic_set((int32 *)arg0, (int32)arg1);
|
||||
break;
|
||||
case SYSCALL_TEST_AND_SET:
|
||||
*call_ret = user_test_and_set((int *)arg0, (int)arg1, (int)arg2);
|
||||
*call_ret = user_test_and_set((int32 *)arg0, (int32)arg1, (int32)arg2);
|
||||
break;
|
||||
case SYSCALL_SYSCTL:
|
||||
*call_ret = user_sysctl((int *)arg0, (uint)arg1, (void *)arg2,
|
||||
|
Loading…
Reference in New Issue
Block a user