瀏覽代碼

adapted signature of o_thrKill()

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7119 8c9fc860-2736-0410-a75d-ab315db34111
eth.guenter 8 年之前
父節點
當前提交
db0865d8cf
共有 2 個文件被更改,包括 8 次插入6 次删除
  1. 4 3
      UnixAos/boot/Threads.darwin.c
  2. 4 3
      UnixAos/boot/Threads.linux.c

+ 4 - 3
UnixAos/boot/Threads.darwin.c

@@ -214,16 +214,17 @@ o_thrGetprio(o_thr_t thr) {
 
 
 void 
-o_thrKill(o_thr_t thr) {
+o_thrKill(o_thr_t thr, int sig) {
 
-    if (thr != mainthread) {
+    pthread_kill( thr, sig );
+/*  if (thr != mainthread) {
     	pthread_detach( thr );
     	if (thr == pthread_self())
     	    pthread_exit( 0 );
     	else {
     	    pthread_cancel( thr );
         } 
-    }
+    }	*/
 }
 
 

+ 4 - 3
UnixAos/boot/Threads.linux.c

@@ -249,16 +249,17 @@ o_thrGetprio(o_thr_t thr) {
 
 
 void 
-o_thrKill(o_thr_t thr) {
+o_thrKill(o_thr_t thr, int sig) {
 
-    if (thr != mainthread) {
+    pthread_kill( thr, sig );
+/*  if (thr != mainthread) {
     	pthread_detach( thr );
     	if (thr == pthread_self())
     	    pthread_exit( 0 );
     	else {
     	    pthread_cancel( thr );
         } 
-    }
+    }	*/
 }