projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6cf09af
)
C++: don't use C++ keywords as names (this, new, etc.)
author
Brian Norris
<banorris@uci.edu>
Tue, 13 Mar 2012 18:35:55 +0000
(11:35 -0700)
committer
Brian Norris
<banorris@uci.edu>
Tue, 13 Mar 2012 18:41:34 +0000
(11:41 -0700)
libthreads.c
patch
|
blob
|
history
schedule.c
patch
|
blob
|
history
diff --git
a/libthreads.c
b/libthreads.c
index dbaf9e96435a7c04bb3e5301974ef0f315f36cdc..1b7f3db6ac79d37afc20b954f3423b4bd95dfae5 100644
(file)
--- a/
libthreads.c
+++ b/
libthreads.c
@@
-51,9
+51,9
@@
static int create_initial_thread(struct thread *t)
return create_context(t);
}
return create_context(t);
}
-static int thread_swap(struct thread *
old, struct thread *new
)
+static int thread_swap(struct thread *
t1, struct thread *t2
)
{
{
- return swapcontext(&
old->context, &new
->context);
+ return swapcontext(&
t1->context, &t2
->context);
}
static void thread_dispose(struct thread *t)
}
static void thread_dispose(struct thread *t)
diff --git
a/schedule.c
b/schedule.c
index 290bdf73a6eaf30489e888d4f570d6a4f58e4713..f4f1c13df96232f545423b00fbc968c9c8bd1361 100644
(file)
--- a/
schedule.c
+++ b/
schedule.c
@@
-6,7
+6,7
@@
#include "model.h"
struct thread_list_node {
#include "model.h"
struct thread_list_node {
- struct thread *t
his
;
+ struct thread *t;
struct thread_list_node *next;
int live;
};
struct thread_list_node *next;
int live;
};
@@
-27,7
+27,7
@@
static void enqueue_thread(struct thread *t)
printf("ran out of nodes\n");
exit(1);
}
printf("ran out of nodes\n");
exit(1);
}
- node->t
his
= t;
+ node->t = t;
node->next = NULL;
node->live = 1;
node->next = NULL;
node->live = 1;
@@
-45,7
+45,7
@@
static struct thread *dequeue_thread(void)
if (!head)
return NULL;
if (!head)
return NULL;
- pop = head->t
his
;
+ pop = head->t;
head->live = 0;
if (head == tail)
tail = NULL;
head->live = 0;
if (head == tail)
tail = NULL;