This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cyg_io_read blocking


Hi, 
Sample code of "cyg_io_read", "cyg_io_write" that
blocks when a thread is spawned, but if called from a 
functions dosent.

void cyg_user_start( void )
{
    cyg_thread_create( 4, serial_thread_handler, ...
                     );
    cyg_thread_resume( handle );
}

void serial_thread_handler( cyg_addrword_t data )
{
     cyg_io_lookup( &hdl );
     for( ; ; ){
          cyg_io_read( hdl, &ch, &len );
          cyg_io_write( hdl, &ch, &len );
     }
}

But if "serial_thread_handler" is directly called from
"cyg_user_start" as a function call, there is no
issues.

Regards,
Raghu.


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]