Skip to content

Commit

Permalink
linux-user sigaltstack() syscall, by Thayne Harbaugh.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3252 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
ths committed Sep 27, 2007
1 parent e3b9808 commit a04e134
Show file tree
Hide file tree
Showing 20 changed files with 425 additions and 43 deletions.
24 changes: 24 additions & 0 deletions linux-user/alpha/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 4096
#define TARGET_SIGSTKSZ 16384

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/arm/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/i386/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/m68k/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/mips/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_ulong ss_size;
target_long ss_flags;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/ppc/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
24 changes: 24 additions & 0 deletions linux-user/ppc64/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
4 changes: 4 additions & 0 deletions linux-user/qemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "cpu.h"
#include "syscall.h"
#include "target_signal.h"
#include "gdbstub.h"

/* This struct is used to hold certain information about the image.
Expand Down Expand Up @@ -149,6 +150,9 @@ void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo);
long do_sigreturn(CPUState *env);
long do_rt_sigreturn(CPUState *env);
int do_sigaltstack(const struct target_sigaltstack *uss,
struct target_sigaltstack *uoss,
target_ulong sp);

#ifdef TARGET_I386
/* vm86.c */
Expand Down
24 changes: 24 additions & 0 deletions linux-user/sh4/target_signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef TARGET_SIGNAL_H
#define TARGET_SIGNAL_H

#include "cpu.h"

/* this struct defines a stack used during syscall handling */

typedef struct target_sigaltstack {
target_ulong ss_sp;
target_long ss_flags;
target_ulong ss_size;
} target_stack_t;


/*
* sigaltstack controls
*/
#define TARGET_SS_ONSTACK 1
#define TARGET_SS_DISABLE 2

#define TARGET_MINSIGSTKSZ 2048
#define TARGET_SIGSTKSZ 8192

#endif /* TARGET_SIGNAL_H */
Loading

0 comments on commit a04e134

Please sign in to comment.