mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 05:41:37 +00:00
[LibOS] Remove unused check_stack_hook()
This commit is contained in:
@@ -161,8 +161,6 @@ void syscall_wrapper_after_syscalldb(void);
|
||||
|
||||
#define SHIM_ARG_TYPE long
|
||||
|
||||
void check_stack_hook (void);
|
||||
|
||||
static inline int64_t get_cur_preempt (void) {
|
||||
shim_tcb_t* tcb = shim_get_tcb();
|
||||
assert(tcb);
|
||||
@@ -173,8 +171,7 @@ static inline int64_t get_cur_preempt (void) {
|
||||
SHIM_ARG_TYPE __shim_##name(args) { \
|
||||
SHIM_ARG_TYPE ret = 0; \
|
||||
int64_t preempt = get_cur_preempt(); \
|
||||
__UNUSED(preempt); \
|
||||
/* check_stack_hook(); */
|
||||
__UNUSED(preempt);
|
||||
|
||||
#define END_SHIM(name) \
|
||||
handle_signals(); \
|
||||
|
||||
@@ -870,22 +870,6 @@ int create_handle (const char * prefix, char * uri, size_t size,
|
||||
id ? : &suffix, hdl, NULL);
|
||||
}
|
||||
|
||||
void check_stack_hook (void)
|
||||
{
|
||||
struct shim_thread * cur_thread = get_cur_thread();
|
||||
|
||||
void* rsp = current_stack();
|
||||
|
||||
if (rsp <= cur_thread->stack_top && rsp > cur_thread->stack) {
|
||||
if ((uintptr_t)rsp - (uintptr_t)cur_thread->stack < PAL_CB(alloc_align))
|
||||
SYS_PRINTF("*** stack is almost drained (RSP = %p, stack = %p-%p) ***\n",
|
||||
rsp, cur_thread->stack, cur_thread->stack_top);
|
||||
} else {
|
||||
SYS_PRINTF("*** context dismatched with thread stack (RSP = %p, stack = %p-%p) ***\n",
|
||||
rsp, cur_thread->stack, cur_thread->stack_top);
|
||||
}
|
||||
}
|
||||
|
||||
noreturn void shim_clean_and_exit(int exit_code) {
|
||||
static int in_terminate = 0;
|
||||
if (__atomic_add_fetch(&in_terminate, 1, __ATOMIC_RELAXED) > 1) {
|
||||
|
||||
Reference in New Issue
Block a user