_single_threaded should have C linkage. Was for some reason only a

problem with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-03-25 01:56:46 +00:00
parent c83ee60a7b
commit c7c82420e1
2 changed files with 11 additions and 3 deletions

View File

@ -14,11 +14,19 @@
# error "This file must be included from stdio.h!"
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern char _single_threaded;
// this boolean value is true (1) if there is only the main thread
// running - as soon as you spawn the first thread, it's set to
// false (0)
#ifdef __cplusplus
}
#endif
#define getc(stream) \
(_single_threaded ? getc_unlocked(stream) : getc(stream))
#define putc(c, stream) \

View File

@ -13,14 +13,14 @@
struct user_space_program_args;
struct real_time_data;
extern char _single_threaded;
/* This determines if a process runs single threaded or not */
#ifdef __cplusplus
extern "C" {
#endif
extern char _single_threaded;
/* This determines if a process runs single threaded or not */
status_t __parse_invoke_line(char *invoker, char ***_newArgs,
char * const **_oldArgs, int32 *_argCount, const char *arg0);
status_t __get_next_image_dependency(image_id id, uint32 *cookie,