1/* 2 * Copyright 2020 The Emscripten Authors. All rights reserved. 3 * Emscripten is available under two separate licenses, the MIT license and the 4 * University of Illinois/NCSA Open Source License. Both these licenses can be 5 * found in the LICENSE file. 6 */ 7 8#include <emscripten.h> 9#include <emscripten/stack.h> 10 11void emscripten_scan_stack(em_scan_func func) { 12 uintptr_t base = emscripten_stack_get_base(); 13 uintptr_t end = emscripten_stack_get_current(); 14 func((void*)end, (void*)base); 15} 16 17