int main(int argc, char**argv) { printf("#################################\n"); printf("# DE STIJL PROJECT #\n"); printf("#################################\n"); //signal(SIGTERM, catch_signal); //signal(SIGINT, catch_signal); /* Avoids memory swapping for this program */ mlockall(MCL_CURRENT | MCL_FUTURE); /* For printing, please use rt_print_auto_init() and rt_printf () in rtdk.h * (The Real-Time printing library). rt_printf() is the same as printf() * except that it does not leave the primary mode, meaning that it is a * cheaper, faster version of printf() that avoids the use of system calls * and locks, instead using a local ring buffer per real-time thread along * with a process-based non-RT thread that periodically forwards the * contents to the output stream. main() must call rt_print_auto_init(1) * before any calls to rt_printf(). If you forget this part, you won't see * anything printed. */ rt_print_auto_init(1); initStruct(); startTasks(); pause(); deleteTasks(); return 0; }
void LocalXmlBackend::sync() { // Step 1: Remove disposed objects starting from top deleteTodoLists(); deleteTodos(); deleteTasks(); // Step 2: Save modified objects saveTodoLists(); saveTodos(); saveTasks(); }