3 /* process_rl - GRAS process handling on real life */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003,2004 da GRAS posse. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "Virtu/virtu_rl.h"
13 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(process,GRAS);
16 static gras_process_data_t *_gras_process_data;
18 gras_error_t gras_process_init() {
19 // gras_error_t errcode;
21 if (!(_gras_process_data=(gras_process_data_t *)malloc(sizeof(gras_process_data_t))))
24 WARNING0("Implement message queue");
26 TRY(gras_dynar_new( &(_gras_process_data->msg_queue) ));
27 TRY(gras_dynar_new( &(_gras_process_data->cbl_list) ));
30 _gras_process_data->userdata = NULL;
33 gras_error_t gras_process_exit() {
34 WARNING0("FIXME: not implemented (=> leaking on exit :)");
38 /* **************************************************************************
40 * **************************************************************************/
42 void *gras_userdata_get(void) {
43 return _gras_process_data->userdata;
46 void *gras_userdata_set(void *ud) {
47 _gras_process_data->userdata = ud;