Worked on configure a bit
[hrr.git] / not / not.h
blob90daa11d6e18ee32bca3ee6c0acd922daba71888
1 /*
2 -----BEGIN PGP SIGNED MESSAGE-----
3 Hash: SHA1
5 m m mm mmm .----------. .---------------------. mmm mm m m
6 8 8 88 888 | .--------` | .------------------` 888 88 8 8
7 8 8 88 888 | ```````|`V```````| |``||``|`````| 888 88 8 8
8 8 8 88 888 `------ | | [] | |``````|| | [] | 888 88 8 8
9 8 8 88 888 |`````` | | | ````|```` | | 888 88 8 8
10 ` ` `` ``` ``````````````> |````````````| |`` ``` `` ` `
11 ==============` `---`
12 L A B O R A T O R I E S
14 This file is part of Hacker Radio Rec.
16 Hacker Radio Rec is free software: you can redistribute it and/or
17 modify it under the terms of the GNU General Public License as
18 published by the Free Software Foundation, either version 3 of
19 the License or (at your option) any later version.
21 Hacker Radio Rec is distributed in the hope that it will be
22 useful, but WITHOUT ANY WARRANTY; without even the implied
23 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 See the GNU General Public License for more details.
26 Copyright (C) 2009, Thea DeSilva
27 You can find a copy of GNU General Public License in COPYING
30 #define SIG_CODER SIGUSR1
31 #define SIG_PLAYER SIGVTALRM
32 #define SIG_HOST SIGUSR2
34 #define HOST 0
35 #define PLAYER 1
36 #define CODER 2
38 #define DROP 1
39 #define STORE 2
42 typedef struct {
43 Sint32 msg, len;
44 void *data;
45 } msgstore_t;
47 extern Sint32 coder_block, player_block, host_block;
49 #define SYNCRET_PLAYER \
50 while(player_return_ready!=1);
52 #define SYNCRET_CODER \
53 while(coder_return_ready!=1);
55 #define SYNCRET_HOST \
56 while(host_return_ready!=1);
58 #define PLAYER_RETURN(X) \
59 player_return = (X);\
60 player_return_ready = 1;
62 #define HOST_RETURN(X) \
63 host_return = (X);\
64 host_return_ready = 1;
66 #define CODER_RETURN(X) \
67 coder_return = (X);\
68 coder_return_ready = 1;
72 extern Sint32 coder_return, player_return, host_return;
73 extern Sint32 coder_return_ready, player_return_ready, host_return_ready;
76 #define HOST_BLOCK host_block=1;
77 #define HOST_UNBLOCK host_block=0;
79 #define LIB_BLOCK lib_block=1;
80 #define LIB_UNBLOCK lib_unblock=0;
82 void send_player(Sint32 msg, void *data, Sint32 len, Sint32 type);
83 void send_coder(Sint32 msg, void *data, Sint32 len, Sint32 type);
84 void send_host(Sint32 msg, void *data, Sint32 len, Sint32 type);
86 extern pthread_t *coder_thread, *player_thread, host_thread;
88 pthread_t *new_thread(Sint32 (*proc)(void));
90 Sint32 init_not(Sint32 type, void (*proc)(Sint32 msg, void *data, Sint32 len));
92 Thank you for your attention
93 -----BEGIN PGP SIGNATURE-----
94 Version: GnuPG v1.4.9 (OpenBSD)
96 iEYEARECAAYFAkrsgvEACgkQMNO4A6bnBrMFlgCePaqpKjD/OOcuBpmw9JzPu4CO
97 fsoAn2TMr9vKKJKUMRoVzk5Pcp44B6r3
98 =zUJt
99 -----END PGP SIGNATURE-----