TinySTM  1.0.5
mod_cb.h
Go to the documentation of this file.
1 /*
2  * File:
3  * mod_cb.h
4  * Author(s):
5  * Pascal Felber <pascal.felber@unine.ch>
6  * Patrick Marlier <patrick.marlier@unine.ch>
7  * Description:
8  * Module for user callbacks.
9  *
10  * Copyright (c) 2007-2014.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation, version 2
15  * of the License.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * This program has a dual license and can also be distributed
23  * under the terms of the MIT license.
24  */
25 
36 #ifndef _MOD_CB_H_
37 # define _MOD_CB_H_
38 
39 # include "stm.h"
40 
41 # ifdef __cplusplus
42 extern "C" {
43 # endif
44 
58 int stm_on_commit(void (*on_commit)(void *arg), void *arg);
59 
73 int stm_on_abort(void (*on_abort)(void *arg), void *arg);
74 
81 void mod_cb_init(void);
82 
83 # ifdef __cplusplus
84 }
85 # endif
86 
87 #endif /* _MOD_CB_H_ */