summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
46299e3)
This is a bug in the stupid driver I wrote (i.e., my fault). I was
struggling with the syntax, so I forgot to even initialize my objects.
-struct mcs_mutex *mutex;
int user_main(int argc, char **argv)
{
int user_main(int argc, char **argv)
{
- mcs_mutex::guard *g = new mcs_mutex::guard(mutex);
- mutex->lock(g);
- mutex->unlock(g);
+ mcs_mutex::guard *g = new mcs_mutex::guard(&mutex);
+ mutex.lock(g);
+ mutex.unlock(g);