Deleted Added
full compact
thr_yield.c (13546) thr_yield.c (34224)
1/*
2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33#ifdef _THREAD_SAFE
34#include <pthread.h>
35#include "pthread_private.h"
36
1/*
2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33#ifdef _THREAD_SAFE
34#include <pthread.h>
35#include "pthread_private.h"
36
37int
38sched_yield(void)
39{
40 /* Reset the accumulated time slice value for the current thread: */
41 _thread_run->slice_usec = -1;
42
43 /* Schedule the next thread: */
44 _thread_kern_sched(NULL);
45
46 /* Always return no error. */
47 return(0);
48}
49
50/* Draft 4 yield */
37void
38pthread_yield(void)
39{
40 /* Reset the accumulated time slice value for the current thread: */
41 _thread_run->slice_usec = -1;
42
43 /* Schedule the next thread: */
44 _thread_kern_sched(NULL);
45
46 /* Nothing to return. */
47 return;
48}
49#endif
51void
52pthread_yield(void)
53{
54 /* Reset the accumulated time slice value for the current thread: */
55 _thread_run->slice_usec = -1;
56
57 /* Schedule the next thread: */
58 _thread_kern_sched(NULL);
59
60 /* Nothing to return. */
61 return;
62}
63#endif