commit Stephen Hemminger's Linux theading improvements
Этот коммит содержится в:
родитель
8533afdf9d
Коммит
1d560e15c4
2
AUTHORS
2
AUTHORS
@ -26,3 +26,5 @@ John Estabrook <jestabro@ncsa.uiuc.edu>
|
|||||||
Andrew Gallatin <gallatin@gmail.com>
|
Andrew Gallatin <gallatin@gmail.com>
|
||||||
* threading fix and non Linux performance improvements
|
* threading fix and non Linux performance improvements
|
||||||
|
|
||||||
|
Stephen Hemminger <shemminger@linux-foundation.org>
|
||||||
|
* Linux scheduler selection and theading improvements
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2008-03-19 Stephen Hemminger <shemminger@linux-foundation.org>
|
||||||
|
|
||||||
|
* Use sched_yield rather than usleep(0) as it behaves better on Linux
|
||||||
|
|
||||||
2008-03-12 Jon Dugan <jdugan@x1024.net>
|
2008-03-12 Jon Dugan <jdugan@x1024.net>
|
||||||
|
|
||||||
* Rework Client::RunTCP so to update the stats for every packet if -i is set.
|
* Rework Client::RunTCP so to update the stats for every packet if -i is set.
|
||||||
|
@ -405,9 +405,12 @@ int thread_numuserthreads( void ) {
|
|||||||
void thread_rest ( void ) {
|
void thread_rest ( void ) {
|
||||||
#if defined( HAVE_THREAD )
|
#if defined( HAVE_THREAD )
|
||||||
#if defined( HAVE_POSIX_THREAD )
|
#if defined( HAVE_POSIX_THREAD )
|
||||||
// TODO add checks for sched_yield or pthread_yield and call that
|
#if defined( _POSIX_PRIORITY_SCHEDULING )
|
||||||
// if available
|
sched_yield();
|
||||||
|
#else
|
||||||
usleep( 0 );
|
usleep( 0 );
|
||||||
|
#endif
|
||||||
|
|
||||||
#else // Win32
|
#else // Win32
|
||||||
SwitchToThread( );
|
SwitchToThread( );
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user