Changeset 4fed5ac in rtems


Ignore:
Timestamp:
Apr 30, 2018, 8:05:46 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
32b5b23
Parents:
bf76d5fe
git-author:
Sebastian Huber <sebastian.huber@…> (04/30/18 08:05:46)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/02/18 07:56:48)
Message:

ftpd: Fairplay with libbsd

Update #3419.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ftpd/ftpd.c

    rbf76d5fe r4fed5ac  
    200200#include <ctype.h>
    201201#include <inttypes.h>
     202#include <sched.h>
    202203
    203204#include <rtems.h>
     
    305306 */
    306307static int ftpd_access = 0;
     308
     309static void
     310yield(void)
     311{
     312/*
     313 * If we build not for the legacy network stack, then we use the libbsd.  In
     314 * the libbsd there is no global network stack semaphore which provides round
     315 * robin fairness for threads of equal priority.
     316 */
     317#ifndef RTEMS_NETWORKING
     318  yield();
     319#endif
     320}
    307321
    308322/*
     
    787801        if(send(s, buf, n, 0) != n)
    788802          break;
     803        yield();
    789804      }
    790805    }
     
    822837        }
    823838        while((rest -= i) > 0);
     839        yield();
    824840      }
    825841    }
     
    10151031          break;
    10161032        }
     1033        yield();
    10171034      }
    10181035    }
     
    10761093        }
    10771094        while((rest -= i) > 0);
     1095        yield();
    10781096      }
    10791097    }
Note: See TracChangeset for help on using the changeset viewer.