syslet: asm-generic support to disable syslets This provides an implementation of the architecture dependent portion of syslets which disables syslet operations. This patch is an incomplete demonstration. All asm-*/syslet*.h files would include these files until their architectures provide implementations which enable syslet support. Signed-off-by: Zach Brown --- include/asm-generic/syslet-abi.h | 11 +++++++++++ include/asm-generic/syslet.h | 34 ++++++++++++++++++++++++++++++++++ include/asm-x86/syslet-abi.h | 1 + include/asm-x86/syslet.h | 1 + 4 files changed, 47 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/syslet-abi.h b/include/asm-generic/syslet-abi.h new file mode 100644 index 0000000..5d19971 --- /dev/null +++ b/include/asm-generic/syslet-abi.h @@ -0,0 +1,11 @@ +#ifndef _ASM_GENERIC_SYSLET_ABI_H +#define _ASM_GENERIC_SYSLET_ABI_H + +/* + * I'm assuming that a u64 ip and u64 esp won't be enough for all + * archs, so I just let each arch define its own. + */ +struct syslet_frame { +}; + +#endif diff --git a/include/asm-generic/syslet.h b/include/asm-generic/syslet.h new file mode 100644 index 0000000..de9a750 --- /dev/null +++ b/include/asm-generic/syslet.h @@ -0,0 +1,34 @@ +#ifndef _ASM_GENERIC_SYSLET_H +#define _ASM_GENERIC_SYSLET_H + +/* + * This provider of the arch-specific syslet APIs is used when an architecture + * doesn't support syslets. + */ + +/* this stops the other functions from ever being called */ +static inline int syslet_frame_valid(struct syslet_frame *frame) +{ + return 0; +} + +static inline void set_user_frame(struct task_struct *task, + struct syslet_frame *frame) +{ + BUG(); +} + +static inline void move_user_context(struct task_struct *dest, + struct task_struct *src) +{ + BUG(); +} + +static inline int create_syslet_thread(long (*fn)(void *), + void *arg, unsigned long flags) +{ + BUG(); + return 0; +} + +#endif diff --git a/include/asm-x86/syslet-abi.h b/include/asm-x86/syslet-abi.h new file mode 100644 index 0000000..14a7182 --- /dev/null +++ b/include/asm-x86/syslet-abi.h @@ -0,0 +1 @@ +#include diff --git a/include/asm-x86/syslet.h b/include/asm-x86/syslet.h new file mode 100644 index 0000000..583d810 --- /dev/null +++ b/include/asm-x86/syslet.h @@ -0,0 +1 @@ +#include