1 /* Copyright (c) 2015 Regents of the University of California
3 * Author: Brian Demsky <bdemsky@uci.edu>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
11 #include "cmodelint.h"
12 #include "threads-model.h"
14 /** Performs a read action.*/
15 uint64_t model_read_action(void * obj, memory_order ord) {
19 /** Performs a write action.*/
20 void model_write_action(void * obj, memory_order ord, uint64_t val) {
23 /** Performs an init action. */
24 void model_init_action(void * obj, uint64_t val) {
28 * Performs the read part of a RMW action. The next action must either be the
29 * write part of the RMW action or an explicit close out of the RMW action w/o
32 uint64_t model_rmwr_action(void *obj, memory_order ord) {
36 /** Performs the write part of a RMW action. */
37 void model_rmw_action(void *obj, memory_order ord, uint64_t val) {
40 /** Closes out a RMW action without doing a write. */
41 void model_rmwc_action(void *obj, memory_order ord) {
44 /** Issues a fence operation. */
45 void model_fence_action(memory_order ord) {