* This fixes the remaining warnings in exit.c

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-11-26 17:00:09 +00:00
parent 3f67d04bc4
commit f4ab5d73ce
3 changed files with 22 additions and 14 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2004-2007, Axel Dörfler, [email protected]. * Copyright 2004-2009, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef LIBROOT_PRIVATE_H #ifndef LIBROOT_PRIVATE_H
@@ -29,6 +29,8 @@ status_t __test_executable(const char *path, char *invoker);
status_t __flatten_process_args(const char* const* args, int32 argCount, status_t __flatten_process_args(const char* const* args, int32 argCount,
const char* const* env, int32 envCount, char*** _flatArgs, const char* const* env, int32 envCount, char*** _flatArgs,
size_t* _flatSize); size_t* _flatSize);
void _call_atexit_hooks_for_range(addr_t start, addr_t size);
void __init_exit_stack_lock(void);
void __init_env(const struct user_space_program_args *args); void __init_env(const struct user_space_program_args *args);
void __init_heap(void); void __init_heap(void);
+2 -3
View File
@@ -1,8 +1,9 @@
/* /*
* Copyright 2003-2007, Axel Dörfler, [email protected]. * Copyright 2003-2009, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#include <string.h> #include <string.h>
#include <fork.h> #include <fork.h>
@@ -13,8 +14,6 @@
void initialize_before(image_id imageID); void initialize_before(image_id imageID);
void _call_atexit_hooks_for_range(addr_t start, addr_t size);
void __init_exit_stack_lock();
struct rld_export *__gRuntimeLoader = NULL; struct rld_export *__gRuntimeLoader = NULL;
// This little bugger is set to something meaningful by the runtime loader // This little bugger is set to something meaningful by the runtime loader
+17 -10
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2004, Haiku Inc. All rights reserved. * Copyright 2004-2009, Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Author(s): * Author(s):
@@ -15,6 +15,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include <libroot_private.h>
#include <runtime_loader.h> #include <runtime_loader.h>
#include <syscalls.h> #include <syscalls.h>
@@ -35,15 +36,6 @@ struct exit_stack_info {
static struct exit_stack_info sExitStackInfo = { {}, 0, -1, 0, -1, 0 }; static struct exit_stack_info sExitStackInfo = { {}, 0, -1, 0, -1, 0 };
void
__init_exit_stack_lock()
{
sExitStackInfo.lock = create_sem(0, "exit stack lock");
if (sExitStackInfo.lock < 0)
debugger("failed to create exit stack lock");
}
static void static void
_exit_stack_lock() _exit_stack_lock()
{ {
@@ -73,6 +65,9 @@ _exit_stack_unlock()
} }
// #pragma mark - private API
void void
_call_atexit_hooks_for_range(addr_t start, addr_t size) _call_atexit_hooks_for_range(addr_t start, addr_t size)
{ {
@@ -105,6 +100,18 @@ _call_atexit_hooks_for_range(addr_t start, addr_t size)
} }
void
__init_exit_stack_lock(void)
{
sExitStackInfo.lock = create_sem(0, "exit stack lock");
if (sExitStackInfo.lock < 0)
debugger("failed to create exit stack lock");
}
// #pragma mark - public API
void void
abort() abort()
{ {