Change list_elem from typedef to struct.
[pintos-anon] / solutions / p1-2.patch
index dfae038bbb4367526d07ebc9aaf5bd61c21f59de..3c0866efe81a377371b5f2c7aaabbd31ed454b16 100644 (file)
@@ -81,7 +81,7 @@ diff -X pat -urpN src/threads/thread.c~ src/threads/thread.c
  thread_exit (void) 
  {
 +  struct thread *t = thread_current ();
-+  list_elem *e, *next;
++  struct list_elem *e, *next;
 +
    ASSERT (!intr_context ());
  
@@ -121,7 +121,7 @@ diff -X pat -urpN src/threads/thread.c~ src/threads/thread.c
 +thread_join (tid_t child_tid) 
 +{
 +  struct thread *cur = thread_current ();
-+  list_elem *e;
++  struct list_elem *e;
 +
 +  for (e = list_begin (&cur->children); e != list_end (&cur->children); ) 
 +    {
@@ -162,8 +162,8 @@ diff -X pat -urpN src/threads/thread.h~ src/threads/thread.h
 +    struct latch ready_to_die;          /* Release when thread about to die. */
 +    struct semaphore can_die;           /* Up when thread allowed to die. */
 +    struct list children;               /* List of child threads. */
-+    list_elem children_elem;            /* Element of `children' list. */
++    struct list_elem children_elem;     /* Element of `children' list. */
 +
      /* Shared between thread.c and synch.c. */
-     list_elem elem;                     /* List element. */
+     struct list_elem elem;              /* List element. */