Changeset 492 for trunk/kernel/kern/thread.c
- Timestamp:
- Aug 22, 2018, 11:55:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.c
r485 r492 238 238 vseg_t * vseg; // stack vseg 239 239 240 assert( (attr != NULL) , __FUNCTION__,"pthread attributes must be defined" );240 assert( (attr != NULL) , "pthread attributes must be defined" ); 241 241 242 242 #if DEBUG_THREAD_USER_CREATE … … 594 594 #endif 595 595 596 assert( (thread->type == THREAD_USER ) , __FUNCTION__,"bad type" );597 assert( (thread->signature == THREAD_SIGNATURE) , __FUNCTION__,"bad signature" );598 assert( (thread->local_locks == 0) , __FUNCTION__,"bad local locks" );599 assert( (thread->remote_locks == 0) , __FUNCTION__,"bad remote locks" );596 assert( (thread->type == THREAD_USER ) , "bad type" ); 597 assert( (thread->signature == THREAD_SIGNATURE) , "bad signature" ); 598 assert( (thread->local_locks == 0) , "bad local locks" ); 599 assert( (thread->remote_locks == 0) , "bad remote locks" ); 600 600 601 601 // re-initialize various thread descriptor fields … … 662 662 hal_cpu_context_exec( thread ); 663 663 664 assert( false, __FUNCTION__,"we should execute this code");664 assert( false, "we should execute this code"); 665 665 666 666 return 0; … … 679 679 680 680 assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) , 681 __FUNCTION__ ,"illegal thread type" );681 "illegal thread type" ); 682 682 683 683 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , 684 __FUNCTION__ ,"illegal core_lid" );684 "illegal core_lid" ); 685 685 686 686 #if DEBUG_THREAD_KERNEL_CREATE … … 740 740 lid_t core_lid ) 741 741 { 742 assert( (type == THREAD_IDLE) , __FUNCTION__ ,"illegal thread type" );743 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , __FUNCTION__ ,"illegal core index" );742 assert( (type == THREAD_IDLE) , "illegal thread type" ); 743 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , "illegal core index" ); 744 744 745 745 // initialize thread descriptor … … 752 752 0 , 0 ); // no user stack for a kernel thread 753 753 754 assert( (error == 0), __FUNCTION__,"cannot create thread idle" );754 assert( (error == 0), "cannot create thread idle" ); 755 755 756 756 // allocate & initialize CPU context if success 757 757 error = hal_cpu_context_alloc( thread ); 758 758 759 assert( (error == 0), __FUNCTION__,"cannot allocate CPU context" );759 assert( (error == 0), "cannot allocate CPU context" ); 760 760 761 761 hal_cpu_context_init( thread ); … … 782 782 #endif 783 783 784 assert( (thread->local_locks == 0) , __FUNCTION__ ,784 assert( (thread->local_locks == 0) , 785 785 "local lock not released for thread %x in process %x", thread->trdid, process->pid ); 786 786 787 assert( (thread->remote_locks == 0) , __FUNCTION__ ,787 assert( (thread->remote_locks == 0) , 788 788 "remote lock not released for thread %x in process %x", thread->trdid, process->pid ); 789 789 … … 867 867 868 868 // check signal pending in scheduler 869 assert( sched->req_ack_pending , __FUNCTION__ ,"no pending signal" );869 assert( sched->req_ack_pending , "no pending signal" ); 870 870 871 871 // enter critical section … … 1005 1005 // must be deleted by the parent process sys_wait() function 1006 1006 owner_cxy = CXY_FROM_PID( pid ); 1007 assert( ((owner_cxy != target_cxy) || (target_ltid != 0)), __FUNCTION__,1007 assert( ((owner_cxy != target_cxy) || (target_ltid != 0)), 1008 1008 "tharget thread cannot be the main thread\n" ); 1009 1009
Note: See TracChangeset
for help on using the changeset viewer.