src/fs/aufs/aiops.c

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Fri, 17 Nov 2000 23:56:08 +0200

 Solaris does not have sched_yield() in standard libs.
 it is present in realtime lib (-lrt), but librt also defines
 aio_read, aio_write, etc. I'm not sure if such naming clashes
 can cause any problems.
 In any case, 2.4 does not compile by default. We either have to
 add another lib or use some other func. Seems that solaris
 has thr_yield() defined also in pthread lib. Maybe we can
 safely use yield() and rely on threads library to hook it.
 I'm not sure which way to go.

Index: src/fs/aufs/aiops.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/aufs/aiops.c,v
retrieving revision 1.3
diff -u -r1.3 aiops.c
--- src/fs/aufs/aiops.c 2000/11/11 09:40:02 1.3
+++ src/fs/aufs/aiops.c 2000/11/17 17:21:59
@@ -800,7 +800,11 @@
     }
     /* Give up the CPU to allow the threads to do their work */
     if (done_queue.head || request_queue.head)
+#ifndef _SQUID_SOLARIS_
        sched_yield();
+#else
+ yield();
+#endif
 }
 
 aio_result_t *

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Fri Nov 17 2000 - 14:59:08 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:59 MST