On 29/7/21 12:22 am, Gedare Bloom wrote:
> On Tue, Jul 27, 2021 at 2:59 AM <chr...@rtems.org> wrote:
>> From: Chris Johns <chr...@rtems.org>
>> @@ -135,6 +171,8 @@ rtems_bsd_initialize(void)
>>         sbt_tickthreshold = bttosbt(bt_tickthreshold);
>>         maxid_maxcpus = (int) rtems_scheduler_get_processor_maximum();
>>
>> +       maxproc = 16;
> Why not use 1? Is this the smallest value that can be put here?

It is used here:

freebsd/sys/kern/kern_resource.c:       uihashtbl = hashinit(maxproc / 16,
M_UIDINFO, &uihash);

so anything less than 16 crashes. One of those things where you cater for all
cases or you work around how it is implemented and keep as much code as possible
as close to upstream as possible.

>> @@ -331,6 +336,8 @@ kthread_add(void (*func)(void *), void *arg, struct proc 
>> *p, struct thread **new
>>         va_list ap;
>>
>>         va_start(ap, fmt);
>> +       /* the cast here is a hack but passing a proc as a thread struct is 
>> just wrong and I
>> +        * have no idea why it is like this */
> Does this point need discussion?

I do not know, I only added the comment.

Chris

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to