add fsm checker by Gabriel Matni
[lttv.git] / contrib / fsm_checker / FD_CHECK / fd.c
CommitLineData
e09e518e
GM
1#include "fd.h"
2#include <glib.h>
3
4struct fd * fd_Init(){
5 struct fd *this = (struct fd *) g_malloc(sizeof(struct fd));
6 fdContext_Init(&this->_fsm, this);
7 this->pid=-1;
8 this->fd=-1;
9 return this;
10}
11
12int test_args(struct fd *this, int pid, int fd){
13 if(this->pid==pid && this->fd==fd)
14 return 1;
15 return 0;
16}
17
18void fd_save_args(struct fd *this, int pid, int fd){
19 this->pid=pid;
20 this->fd=fd;
21}
22
23int my_process_exit(struct fd *this, int pid){
24 if(this->pid==pid)
25 return 1;
26 return 0;
27}
28
29void fd_destroy_scenario(struct fd *this, int i){
30 //remove fsm from fsm_list... not yet implemented
31
32 removefsm(i);
33 g_free(this);
34}
35void fd_skip_FSM(){
36 skip_FSM();
37}
38void fd_warning(struct fd *this, char *msg){
39 printf("%s\n",msg);
40}
41void fd_print_ts(struct fd *this, long ts_sec, long ts_nsec){
42 printf("ts=%ld.%09ld\n", ts_sec, ts_nsec);
43
44}
This page took 0.023852 seconds and 4 git commands to generate.