Use setfunc to set the cothread function instead of _reset
authorWim Taymans <wim.taymans@gmail.com>
Sun, 16 Jun 2002 17:34:14 +0000 (17:34 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sun, 16 Jun 2002 17:34:14 +0000 (17:34 +0000)
Original commit message from CVS:
Use setfunc to set the cothread function instead of _reset

gst/schedulers/cothreads_compat.h
gst/schedulers/gstbasicscheduler.c
gst/schedulers/gstfastscheduler.c

index 5e1d192..42bef0b 100644 (file)
@@ -50,7 +50,7 @@ typedef cothread_state cothread;
     }\
   }G_STMT_END
 
-#define do_cothread_reset(cothread, context, func, argc, argv) \
+#define do_cothread_setfunc(cothread, context, func, argc, argv) \
   cothread_setfunc ((cothread), (func), (argc), (argv))
   
 #define do_cothread_destroy(cothread)          cothread_free(cothread)
@@ -110,8 +110,8 @@ typedef cothread cothread_context;
     new_thread = cothread_create ((func), 0, (void**) (argv), (context));      \
   }G_STMT_END
   
-#define do_cothread_reset(cothread, context, func, argc, argv) \
-  cothread_reset ((cothread), (func), (argc), (void **) (argv), (context))
+#define do_cothread_setfunc(cothread, context, func, argc, argv) \
+  cothread_setfunc ((cothread), (func), (argc), (void **) (argv), (context))
 
 #define do_cothread_destroy(cothread)          cothread_destroy(cothread)
   
index 8385ba1..9d9fcfa 100644 (file)
@@ -637,8 +637,9 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
                   GST_ELEMENT_THREADSTATE (element),
                   GST_ELEMENT_NAME (element));
       } else {
-       do_cothread_reset (GST_ELEMENT_THREADSTATE (element), chain->sched->context, 
-                          wrapper_function, 0, (char **) element);
+       /* set the cothread wrapper function */
+       do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), chain->sched->context, 
+                            wrapper_function, 0, (char **) element);
        GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s",
                   GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
       }
index d9704aa..6bf18f3 100644 (file)
@@ -308,7 +308,7 @@ gst_fast_scheduler_cothreaded_element (GstBin * bin, GstElement *element)
                   GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
     }
   } else {
-    do_cothread_reset (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element);
+    do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element);
     GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s\n",
                 GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
   }