// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2006 eCosCentric Ltd.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
-//
-// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
-// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Allow other threads to run
Cyg_Scheduler::reschedule();
- CYG_ASSERTCLASS( this, "Bad this pointer");
-
switch( self->get_wake_reason() )
{
case Cyg_Thread::DESTRUCT:
#endif
}
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Unlock the scheduler and maybe switch threads
Cyg_Scheduler::unlock();
- CYG_ASSERTCLASS( this, "Bad this pointer");
CYG_REPORT_RETVAL( result );
return result;
}
get_threadq.enqueue( self );
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
-
+
// Allow other threads to run
Cyg_Scheduler::reschedule();
#endif
}
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Unlock the scheduler and maybe switch threads
Cyg_Scheduler::unlock();
- CYG_ASSERTCLASS( this, "Bad this pointer");
CYG_REPORT_RETVAL( result );
return result;
}
{
CYG_REPORT_FUNCTION();
- CYG_ASSERTCLASS( this, "Bad this pointer");
-
// Prevent preemption
Cyg_Scheduler::lock();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
CYG_INSTRUMENT_MBOXT(TRY, this, count);
cyg_bool result = ( 0 < count );
{
CYG_REPORT_FUNCTION();
- CYG_ASSERTCLASS( this, "Bad this pointer");
-
// Prevent preemption
Cyg_Scheduler::lock();
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
CYG_INSTRUMENT_MBOXT(TRY, this, count);
cyg_bool result = ( 0 < count );