Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Aaron Bannert
On Fri, Aug 03, 2001 at 09:35:02AM -0400, Dale Ghent wrote: > On Fri, 3 Aug 2001, Aaron Bannert wrote: > > | The usage of a thread-level yield is really orthogonal to the > | performance characteristics of the OS scheduler, even on two-level > | systems like Solaris. In all cases (one-level or two

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Dale Ghent
On Fri, 3 Aug 2001, Aaron Bannert wrote: | The usage of a thread-level yield is really orthogonal to the | performance characteristics of the OS scheduler, even on two-level | systems like Solaris. In all cases (one-level or two-level), thread | libraries will at some point have to multiplex one k

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Aaron Bannert
On Thu, Aug 02, 2001 at 08:25:33PM -0700, Justin Erenkrantz wrote: > On Thu, Aug 02, 2001 at 07:46:38PM -0700, Ian Holsman wrote: > > just a note for the person wanting to implement this in unix. > > > > in linux .. pthread_yield would be OK. > > in solaris thr_yield should be used (as pthread_yie

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Ian Holsman
Justin Erenkrantz wrote: On Thu, Aug 02, 2001 at 07:46:38PM -0700, Ian Holsman wrote: just a note for the person wanting to implement this in unix. in linux .. pthread_yield would be OK. in solaris thr_yield should be used (as pthread_yield isn't defined, and posix threads are implemented onto of

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Justin Erenkrantz
On Thu, Aug 02, 2001 at 07:46:38PM -0700, Ian Holsman wrote: > just a note for the person wanting to implement this in unix. > > in linux .. pthread_yield would be OK. > in solaris thr_yield should be used (as pthread_yield isn't defined, and > posix threads are implemented onto of LWP threads )

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Aaron Bannert
That sounds good to me. I'd submit a patch, but I have no idea how we'd do Solaris vs. Linux detection with APR's preprocessor stuff. is there a CPP symbol that we could use for this, or do we have to make one up? -aaron On Thu, Aug 02, 2001 at 07:46:38PM -0700, Ian Holsman wrote: > just a note

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-03 Thread Ian Holsman
just a note for the person wanting to implement this in unix. in linux .. pthread_yield would be OK. in solaris thr_yield should be used (as pthread_yield isn't defined, and posix threads are implemented onto of LWP threads ) Justin/Aaron ??? [EMAIL PROTECTED] wrote: bnicholes01/08/02 17:31:3

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-02 Thread Aaron Bannert
On Thu, Aug 02, 2001 at 11:16:46AM -0400, Jeff Trawick wrote: > > I see your point. How about APR_UNDEFINED or APR_NOSTATUS? > > sounds reasonable to me > > > > Why would a "return NULL" instead of apr_thread_exit() imply exiting > > > under error? It depends upon the app. > > > > I agree that

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-02 Thread Jeff Trawick
Aaron Bannert <[EMAIL PROTECTED]> writes: > On Wed, Aug 01, 2001 at 05:21:52PM -0400, Jeff Trawick wrote: > > Aaron Bannert <[EMAIL PROTECTED]> writes: > > > > > How about instead of assuming APR_SUCCESS we just leave it undefined? > > > This seems counter-intuitive, in that a worker function tha

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-01 Thread Aaron Bannert
On Wed, Aug 01, 2001 at 05:21:52PM -0400, Jeff Trawick wrote: > Aaron Bannert <[EMAIL PROTECTED]> writes: > > > How about instead of assuming APR_SUCCESS we just leave it undefined? > > This seems counter-intuitive, in that a worker function that prematurely > > returns (w/o calling apr_thread_exi

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-01 Thread Jeff Trawick
Aaron Bannert <[EMAIL PROTECTED]> writes: > I posted a fix for this about a week and a half ago. The fix attempted > to do the same thing on other platforms. Also, my fix made one extra > change (that may or may not be agreeable to the group), and that was to > change the prototype of apr_thread_e

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-01 Thread Jeff Trawick
Aaron Bannert <[EMAIL PROTECTED]> writes: > How about instead of assuming APR_SUCCESS we just leave it undefined? > This seems counter-intuitive, in that a worker function that prematurely > returns (w/o calling apr_thread_exit()) was probably exiting under error. What is an undefined apr_status_

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-01 Thread Aaron Bannert
How about instead of assuming APR_SUCCESS we just leave it undefined? This seems counter-intuitive, in that a worker function that prematurely returns (w/o calling apr_thread_exit()) was probably exiting under error. -aaron On Wed, Aug 01, 2001 at 04:54:58PM -, [EMAIL PROTECTED] wrote: > traw

Re: cvs commit: apr/threadproc/unix thread.c

2001-08-01 Thread Aaron Bannert
I posted a fix for this about a week and a half ago. The fix attempted to do the same thing on other platforms. Also, my fix made one extra change (that may or may not be agreeable to the group), and that was to change the prototype of apr_thread_exit() so it takes an apr_status_t instead of an (ap

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-09 Thread David Reid
> > > Argh! I also thought that the purpose of SMS was to replace malloc/free > > > and not pools. If you want to replace pools, then the code should not > > > be called apr_sms_blah. Pool is the name for our memory system -- pool > > > does not, and never has, defined the type of memory behind

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-08 Thread Roy T. Fielding
> > Argh! I also thought that the purpose of SMS was to replace malloc/free > > and not pools. If you want to replace pools, then the code should not > > be called apr_sms_blah. Pool is the name for our memory system -- pool > > does not, and never has, defined the type of memory behind it. > >

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-08 Thread Sander Striker
> On Thu, Jun 07, 2001 at 01:19:27AM +0100, David Reid wrote: > > We could implement pool using sms but we'd loose a great deal > > of flexibility > > and a great opportunity to make APR even more useful. > > > > Pools are a single way of dealing with handing out memory. they imply a > > degree of

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-08 Thread Roy T. Fielding
On Thu, Jun 07, 2001 at 01:19:27AM +0100, David Reid wrote: > We could implement pool using sms but we'd loose a great deal of flexibility > and a great opportunity to make APR even more useful. > > Pools are a single way of dealing with handing out memory. they imply a > degree of overhead and w

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-08 Thread Luke Kenneth Casson Leighton
On Thu, Jun 07, 2001 at 08:03:46AM -0700, [EMAIL PROTECTED] wrote: > > As it happens, this is exactly what I envisioned when SMS was first > discussed. Namely, a new back-end for pools that can use any allocator. ack. sorry for thinking otherwise. luke

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-08 Thread Luke Kenneth Casson Leighton
On Thu, Jun 07, 2001 at 09:27:00AM -0700, Justin Erenkrantz wrote: > On Thu, Jun 07, 2001 at 03:54:24PM +0200, Luke Kenneth Casson Leighton wrote: > > only an SMS instance should know exactly how to deal with its > > memory - _including_ locking - IF it is needed. > > Ah. I see the logic in that.

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Justin Erenkrantz
On Thu, Jun 07, 2001 at 03:54:24PM +0200, Luke Kenneth Casson Leighton wrote: > only an SMS instance should know exactly how to deal with its > memory - _including_ locking - IF it is needed. Ah. I see the logic in that. Thanks for explaining. =) Yes, the SMS should be the only one dealing wit

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread rbb
As it happens, this is exactly what I envisioned when SMS was first discussed. Namely, a new back-end for pools that can use any allocator. Ryan On Thu, 7 Jun 2001, Luke Kenneth Casson Leighton wrote: > > > See, that's where my overall view of "where we hope to get to" differs. > > > In my m

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
> > As for locking, well the logical level for locking to be implemented is in > > the sms module. Look at the standard module. malloc should be thread safe > > so no locking should be required, hence we don't have any. In a tracking > > system we can't guarantee that so we lock. > > I don't rea

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
> > See, that's where my overall view of "where we hope to get to" differs. > > In my mind, APR depends on pools. Period. It would require a > > major overhaul for most APR operations to be safe WITHOUT pools (ie, lots > > of apr_sms_free operations would have to be added, which is exactly what

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
> then you could takle parts of the apr, for example strings > replacing the 'standard' pool memory functions it uses with sms > memory calls in their place, as long as the 'standard' and SMS memory > have the same lifetime. ... i also should point out that your comment leads me to believe that yo

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
On Wed, Jun 06, 2001 at 03:51:55PM -0700, Ian Holsman wrote: > > > > -Original Message- > > From: Sander Striker [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 06, 2001 3:13 PM > > To: Cliff Woolley; David Reid > > Cc: APR Development List > &g

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
On Wed, Jun 06, 2001 at 04:34:22PM -0700, Justin Erenkrantz wrote: > On Wed, Jun 06, 2001 at 11:47:53PM +0100, David Reid wrote: > > This is the crux of the issue methinks. We don't yet have a module that > > would allow us to even get close to replacing pools. We need a lot of > > things from it

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
On Wed, Jun 06, 2001 at 05:35:43PM -0700, Justin Erenkrantz wrote: > On Thu, Jun 07, 2001 at 01:19:27AM +0100, David Reid wrote: > > This isn't possible with pools. They limit you to a single way of getting > > at your memory regardless of how it was obtained. > > What I basically said in my emai

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Luke Kenneth Casson Leighton
> That implies that somebody has to alloc a lock outside, but we know that we > can do that: an SMS around malloc(), a pool around that, then a lock using > that pool. We can then pass that lock to SMS(my-custom-bugger). this lock would be passed in as an argument to the initialisation / creation

SMS stuff (was: Re: cvs commit: apr/threadproc/unix thread.c)

2001-06-07 Thread Greg Stein
On Wed, Jun 06, 2001 at 05:35:43PM -0700, Justin Erenkrantz wrote: > On Thu, Jun 07, 2001 at 01:19:27AM +0100, David Reid wrote: > > This isn't possible with pools. They limit you to a single way of getting > > at your memory regardless of how it was obtained. > > What I basically said in my emai

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Greg Stein
On Wed, Jun 06, 2001 at 08:02:06PM -0400, Cliff Woolley wrote: > On Wed, 6 Jun 2001, Justin Erenkrantz wrote: > > I think the thing is that I've seen the sms as slightly different than > > what it was originally posted as. So, I might be in the minority > > here. I think we are seeing two differen

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Greg Stein
On Wed, Jun 06, 2001 at 03:02:44PM -0400, Cliff Woolley wrote: > On Wed, 6 Jun 2001, Justin Erenkrantz wrote: > > > On Wed, Jun 06, 2001 at 06:12:17PM -, [EMAIL PROTECTED] wrote: > > > - add an apr_pool_t to the sms structure > > > > -1 (non-veto, but awfully close). Uh, why are we doing th

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Justin Erenkrantz
On Thu, Jun 07, 2001 at 01:19:27AM +0100, David Reid wrote: > This isn't possible with pools. They limit you to a single way of getting > at your memory regardless of how it was obtained. What I basically said in my email to David was that I could see having a pool take in an option as to which S

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Cliff Woolley
On Wed, 6 Jun 2001, Justin Erenkrantz wrote: > Ah. Okay. I thought I've seen people say "-1 (non-veto)" before. Fine, You have. We're inconsistent as usual. =-) Just thought I'd mention it since it's been mentioned to me in a very similar situation. > consider my vote -0.9 (because I'm

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread David Reid
I've just replied to Justin direct, but I'll say it here as well... We could implement pool using sms but we'd loose a great deal of flexibility and a great opportunity to make APR even more useful. Pools are a single way of dealing with handing out memory. they imply a degree of overhead and wh

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Justin Erenkrantz
On Wed, Jun 06, 2001 at 08:02:06PM -0400, Cliff Woolley wrote: > The group has told me before that, since all code matters require a > consensus, -1 always means veto. If you really, really, really don't like > it but don't want to veto it, use -0.5 or -0.99 or something. =-) Only > in non-conse

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-07 Thread Cliff Woolley
On Wed, 6 Jun 2001, Justin Erenkrantz wrote: > I think the thing is that I've seen the sms as slightly different than > what it was originally posted as. So, I might be in the minority > here. I think we are seeing two different views of what an sms should > be. > > My -1 was non-veto, so it does

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Sander Striker
> On Wed, Jun 06, 2001 at 11:47:53PM +0100, David Reid wrote: > > This is the crux of the issue methinks. We don't yet have a module that > > would allow us to even get close to replacing pools. We need a lot of > > things from it and Sander and I have had some good early > discussions about > >

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Justin Erenkrantz
On Wed, Jun 06, 2001 at 11:47:53PM +0100, David Reid wrote: > This is the crux of the issue methinks. We don't yet have a module that > would allow us to even get close to replacing pools. We need a lot of > things from it and Sander and I have had some good early discussions about > how it could

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Cliff Woolley
On Wed, 6 Jun 2001, Ian Holsman wrote: > maybe you could take a bit at a time > for example.. modify the pool code so that it has a 'sms' memory pointer > in the structure, on init/destroy you also clean it up .. > then you could takle parts of the apr, for example strings > replacing the 'standar

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Ian Holsman
> -Original Message- > From: Sander Striker [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 06, 2001 3:13 PM > To: Cliff Woolley; David Reid > Cc: APR Development List > Subject: RE: cvs commit: apr/threadproc/unix thread.c > > > > On Wed

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread David Reid
> On Thu, 7 Jun 2001, Sander Striker wrote: > > > Argh!!! [getting abit frustrated now, because there seems to be no > > way of moving forward and thus proving the system] > > I think we're at least starting to face the issues head-on. We're making > progress, believe it or not. =-) Yes we are!

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Cliff Woolley
On Thu, 7 Jun 2001, Sander Striker wrote: > Argh!!! [getting abit frustrated now, because there seems to be no > way of moving forward and thus proving the system] I think we're at least starting to face the issues head-on. We're making progress, believe it or not. =-) > > See, that's where my

RE: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Sander Striker
> On Wed, 6 Jun 2001, David Reid wrote: > > > There is no pleasing some people is there?? > > Nope. =-) Argh!!! [getting abit frustrated now, because there seems to be no way of moving forward and thus proving the system] > > At present pools are a specific implementation of memory management.

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Cliff Woolley
On Wed, 6 Jun 2001, Cliff Woolley wrote: > newstr = apr_pstrdup(apr_sms_t *mem_sys, char *str) > > because then you have to be sure to > > apr_sms_free(str) Make that apr_sms_free(newstr). ;-) -- Cliff Woolley [EMAIL PROTECTED]

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Cliff Woolley
On Wed, 6 Jun 2001, David Reid wrote: > There is no pleasing some people is there?? Nope. =-) > At present pools are a specific implementation of memory management. In > time we hope to get sms to a point where we can replace pools with an sms > module that is better. When we get there, it wo

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread David Reid
There is no pleasing some people is there?? Here I go with an explanation of why I made the change... At present pools are a specific implementation of memory management. In time we hope to get sms to a point where we can replace pools with an sms module that is better. When we get there, it wo

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Cliff Woolley
On Wed, 6 Jun 2001, Justin Erenkrantz wrote: > On Wed, Jun 06, 2001 at 06:12:17PM -, [EMAIL PROTECTED] wrote: > > - add an apr_pool_t to the sms structure > > -1 (non-veto, but awfully close). Uh, why are we doing this? > I thought that a pool would be defined in terms of a sms (not now, bu

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread William A. Rowe, Jr.
From: <[EMAIL PROTECTED]> Sent: Wednesday, June 06, 2001 1:12 PM > This threw up an issue with locking, so next > > - change the locking code to add an owner and ref counting > so we can lock multiple times from the same thread. this was > needed by the apr_sms_tracking_reset code

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread Justin Erenkrantz
On Wed, Jun 06, 2001 at 06:12:17PM -, [EMAIL PROTECTED] wrote: > - add an apr_pool_t to the sms structure -1 (non-veto, but awfully close). Uh, why are we doing this? I thought that a pool would be defined in terms of a sms (not now, but at some point). This would not allow that to happe

Re: cvs commit: apr/threadproc/unix thread.c

2001-06-06 Thread David Reid
Apologies again for this being such a big commit :( I didn't want to commit stuff before I'd finished, but kept finding more bits I had to do before I was "finished". Win32 and OS/2 need the changes I've made to the locking code... david

Re: cvs commit: apr/threadproc/unix thread.c

2001-02-25 Thread rbb
On 25 Feb 2001 [EMAIL PROTECTED] wrote: > trawick 01/02/24 17:24:37 > > Modified:threadproc/unix thread.c > Log: > if we don't have the prototype, we shouldn't have the function either > > (haven't we been here before?) We've been here hundreds of times, and we are likely to rever