BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type recursive_call(Iterator const& iter) { typedef result_of::equal_to<Iterator, type> found; return recursive_call(iter, found()); }
static void data_set_tree_item_dealloc(data_set_tree_item_t * item,InvokeTickDeclare){ if(item){ hrecursive_t recursive = recursive_alloc(); recursive_call(recursive, item, NULL, NULL, NULL, NULL, NULL, data_set_tree_item_dealloc_recursive_callback); recursive_dealloc(recursive); } }
// this functions calls itself and consumes stack every time // the stack space indication should decrement every time // when the stack is all consumed, the processor can do crazy things. // most time it will reset void recursive_call(void) { volatile int stack_size; // volatile necessary to put variable on stack // printing the stacck space stack_size = min_stack_space_available(); printf("stack size : %i\n", stack_size); wait_ms(50); // consuming stack space recursive_call(); }
int test_stack_size(void) { // uart stuff uart_init(); sei(); fdevopen(uart0_dev_send,NULL); // bonjour printf("\n\nhello, I just reset !\nperhaps a lack of stack space\n"); // the beginning of the loop recursive_call(); return 0; }
static type choose_call(Iterator const& iter, Tag) { return recursive_call(iter); }
static type recursive_call(Iterator const& iter) { typedef result_of::equal_to<Iterator, type> found; return recursive_call(iter, found()); }
static type recursive_call(Iterator const& iter, mpl::false_) { return recursive_call(fusion::next(iter)); }
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type choose_call(Iterator const& iter, Tag) { return recursive_call(iter); }
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type recursive_call(Iterator const& iter, mpl::false_) { return recursive_call(fusion::next(iter)); }