Diff for /libaitsched/src/hooks.c between versions 1.13.2.2 and 1.13.2.3

version 1.13.2.2, 2012/08/21 11:45:35 version 1.13.2.3, 2012/08/21 12:50:08
Line 211  sched_hook_cancel(void *task, void *arg __unused) Line 211  sched_hook_cancel(void *task, void *arg __unused)
 #ifdef HAVE_LIBPTHREAD  #ifdef HAVE_LIBPTHREAD
                         pthread_cancel((pthread_t) TASK_VAL(t));                          pthread_cancel((pthread_t) TASK_VAL(t));
 #endif  #endif
                           TASK_UNLOCK(t);
                 default:                  default:
                         return NULL;                          return NULL;
         }          }
Line 218  sched_hook_cancel(void *task, void *arg __unused) Line 219  sched_hook_cancel(void *task, void *arg __unused)
         kevent(TASK_ROOT(t)->root_kq, chg, 1, NULL, 0, &timeout);          kevent(TASK_ROOT(t)->root_kq, chg, 1, NULL, 0, &timeout);
         return NULL;          return NULL;
 }  }
   
   #ifdef HAVE_LIBPTHREAD
   /*
    * sched_hook_thread() - Default THREAD hook
    *
    * @task = current task
    * @arg = pthread attributes
    * return: <0 errors and 0 ok
    */
   void *
   sched_hook_thread(void *task, void *arg)
   {
           sched_task_t *t = task;
           pthread_t tid;
   
           if (!t || !TASK_ROOT(t))
                   return (void*) -1;
   
           if (pthread_create(&tid, (pthread_attr_t*) arg, 
                                   (void *(*)(void*)) TASK_FUNC(t), t)) {
                   LOGERR;
                   return (void*) -1;
           }
   
           if (!TASK_ISLOCKED(t))
                   TASK_LOCK(t);
   
           TASK_VAL(t) = (u_long) tid;
           return NULL;
   }
   #endif
   
 /*  /*
  * sched_hook_read() - Default READ hook   * sched_hook_read() - Default READ hook

Removed from v.1.13.2.2  
changed lines
  Added in v.1.13.2.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>