// -------------------------------------------
// 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####
//==========================================================================
wakeup_putter();
#endif
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Unlock the scheduler and definitely switch threads
Cyg_Scheduler::unlock();
- CYG_ASSERTCLASS( this, "Bad this pointer");
CYG_REPORT_RETVAL( true );
return true;
}
get_threadq.enqueue( self );
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
-
+
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Unlock scheduler and allow other threads to run
Cyg_Scheduler::unlock_reschedule();
default:
break;
}
- CYG_ASSERTCLASS( this, "Bad this pointer");
+
CYG_REPORT_RETVAL( result );
return result;
}
wakeup_putter();
#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( true );
return true;
}
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
}
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// Unlock scheduler and allow other threads to run
Cyg_Scheduler::unlock_reschedule();
// clear the timer; if it actually fired, no worries.
self->clear_timer();
- CYG_ASSERTCLASS( this, "Bad this pointer");
-
cyg_bool result = true;
switch( self->get_wake_reason() )
{
{
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 );
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// when this returns, our item is in the queue.
Cyg_Scheduler::unlock_reschedule(); // unlock, switch threads
- CYG_ASSERTCLASS( this, "Bad this pointer");
-
cyg_bool result = true;
switch( self->get_wake_reason() )
{
if ( !get_threadq.empty() ) {
wakeup_winner( item );
- Cyg_Scheduler::unlock(); // unlock, maybe switch threads
CYG_ASSERTCLASS( this, "Bad this pointer");
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
CYG_REPORT_RETVAL( true );
return true;
}
CYG_INSTRUMENT_MBOXT(WAIT, this, count);
}
+ CYG_ASSERTCLASS( this, "Bad this pointer");
+
// when this returns, our item is in the queue.
Cyg_Scheduler::unlock_reschedule(); // unlock, switch threads
break;
}
- CYG_ASSERTCLASS( this, "Bad this pointer");
CYG_REPORT_RETVAL( result );
return result;
}
if ( !get_threadq.empty() ) {
wakeup_winner( item );
- Cyg_Scheduler::unlock(); // unlock, maybe switch threads
CYG_ASSERTCLASS( this, "Bad this pointer");
+ Cyg_Scheduler::unlock(); // unlock, maybe switch threads
CYG_REPORT_RETVAL( true );
return true;
}
itemqueue[ in ] = item;
+ 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( true );
return true;
}