Prev: Learn about proxy sites and how to use them to open blocked sites unlimited downloads from RapidShare and megaupload and increase the speed of the Internet with new sites for free
Next: Why can't I catch a SIGBUS on my Mac (when strlen(NULL) is used)?
From: Scott Lurndal on 7 Apr 2010 16:55 jt(a)toerring.de (Jens Thoms Toerring) writes: >In comp.unix.programmer Jasen Betts <jasen(a)xnet.co.nz> wrote: >> select() prefers the lowest numbered file descriptor it's asked to >> test/watch so that should be easy to arrange, > >Just curious: in what sense does select() "prefer" lower numbered >file descriptors? for(i=0; i < num_file_descriptors; i++){ if (pending_select[i].is_ready) { return i; } }
From: Scott Lurndal on 7 Apr 2010 16:55 David Schwartz <davids(a)webmaster.com> writes: >On Apr 7, 4:43=A0am, Jasen Betts <ja...(a)xnet.co.nz> wrote: > >> select() prefers the lowest numbered file descriptor it's asked to >> test/watch so that should be easy to arrange, > >Huh?! > >DS on the call, but not subsequent to the wait. scott
From: Peter Olcott on 7 Apr 2010 17:14 "Chris Friesen" <cbf123(a)mail.usask.ca> wrote in message news:0-6dnQ-LxrwscSHWnZ2dnUVZ_judnZ2d(a)posted.sasktel... > On 04/07/2010 12:32 PM, Peter Olcott wrote: > >> Likewise with my scheduling of my >> processes as compared to the OS scheduling them for me. > > The OS has knowledge of what else the system is doing that > you don't have. > >> Is there any way to tell the hardware cache to load >> specific >> data? > > Generally yes, but it requires assembly code. > > Chris > OK thanks.
From: Joe Pfeiffer on 7 Apr 2010 17:15 scott(a)slp53.sl.home (Scott Lurndal) writes: > jt(a)toerring.de (Jens Thoms Toerring) writes: >>In comp.unix.programmer Jasen Betts <jasen(a)xnet.co.nz> wrote: >>> select() prefers the lowest numbered file descriptor it's asked to >>> test/watch so that should be easy to arrange, >> >>Just curious: in what sense does select() "prefer" lower numbered >>file descriptors? > > for(i=0; i < num_file_descriptors; i++){ > if (pending_select[i].is_ready) { > return i; > } > } That isn't select() having a preference, it's you having a preference. If you'd written for(i=num_file_descriptors-1; i >= 0; i--){ if (pending_select[i].is_ready) { return i; } } the code would pick the highest descriptor, not the lowest. There's also the question of how you're getting the signal set into your pending_select[] array. -- As we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. (Benjamin Franklin)
From: David Schwartz on 7 Apr 2010 17:21 On Apr 7, 1:55 pm, sc...(a)slp53.sl.home (Scott Lurndal) wrote: > David Schwartz <dav...(a)webmaster.com> writes: > >On Apr 7, 4:43=A0am, Jasen Betts <ja...(a)xnet.co.nz> wrote: > >> select() prefers the lowest numbered file descriptor it's asked to > >> test/watch so that should be easy to arrange, > >Huh?! > on the call, but not subsequent to the wait. I still have no idea what you're talking about. DS
First
|
Prev
|
Next
|
Last
Pages: 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Prev: Learn about proxy sites and how to use them to open blocked sites unlimited downloads from RapidShare and megaupload and increase the speed of the Internet with new sites for free Next: Why can't I catch a SIGBUS on my Mac (when strlen(NULL) is used)? |