/** This method changes an existing read part of an RMW action into either:
* (1) a full RMW action in case of the completed write or
* (2) a READ action in case a failed action.
+ * @todo If the memory_order changes, we may potentially need to update our
+ * clock vector.
*/
-
-//TODO: If the memory_order changes, we may potentially need to update our
-//clock vector.
-
void ModelAction::process_rmw(ModelAction * act) {
this->order=act->order;
if (act->is_rmwc())
* @param act is the action to consider exploring a reordering.
* @return tells whether we have to explore a reordering.
*/
-
bool ModelAction::is_synchronizing(const ModelAction *act) const
{
//Same thread can't be reordered
}
if (!initialized) {
- /* TODO: need a more informative way of reporting errors */
+ /** @todo Need a more informative way of reporting errors. */
printf("ERROR: may read from uninitialized atomic\n");
}
thread_id_t Node::get_next_backtrack()
{
- /* TODO: find next backtrack */
+ /** @todo Find next backtrack */
unsigned int i;
for (i = 0; i < backtrack.size(); i++)
if (backtrack[i] == true)
+/** @file threads.cc
+ * @brief Thread functions.
+ */
+
+
#include "libthreads.h"
#include "common.h"
#include "threads.h"
* Provides a startup wrapper for each thread, allowing some initial
* model-checking data to be recorded. This method also gets around makecontext
* not being 64-bit clean
+ * @todo We should make the START event always immediately follow the
+ * CREATE event, so we don't get redundant traces...
*/
+
void thread_startup() {
Thread * curr_thread = thread_current();
- /* TODO -- we should make this event always immediately follow the
- CREATE event, so we don't get redundant traces... */
-
/* Add dummy "start" action, just to create a first clock vector */
model->switch_to_master(new ModelAction(THREAD_START, std::memory_order_seq_cst, curr_thread));