On Tue, Jun 28, 2022 at 11:38 AM adr <a...@sdf.org> wrote:
> On Tue, 28 Jun 2022, Dan Cross wrote:
> > You mean by `newthread` and `chancreate`? Those are part of the
> > thread library. Notice that there are no callers outside of 
> > /sys/src/libthread.
>
> What I mean is that "size" in _threadmalloc() will be set by those
> functions with values directly given by the programmer, with this
> limit not documented.

Like I said earlier, plan9 had the luxury of being a research
system. It has brilliant ideas, but mostly trapped inside of
research-quality code. If you look just below the surface,
there are arbitrary limits and edge cases all over the system.
It's honestly surprising that it works as well as it does.

That this particular limit is not documented isn't terribly
surprising. Most of these limits are undocumented. I doubt
anyone ever thought to create a 100MB stack or channel
when that code was written.

> I wouldn't call a function wich is part of an api internal. An
> internal function, for me, is a function inaccesible for the
> programmer, like _threadmalloc itself.
>
> By the way, you mean threadcreate, don't you?

No, I meant the direct calls to `_threadmalloc`.  But sure,
we can say `theadcreate` since that just expands to a call
to `newthead` and `newthread` is static.

We may as well throw `proccreate` into the mix too as it
also indirectly calls `_threadmalloc` via `_newproc`.  For
that matter, libthead's `main` also calls `_threadmalloc`.

I'm not sure if that changes the point, though.

        - Dan C.

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Te1be8dc72738258d-M71941c1e8258c2d786a38352
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to