Changeset 4ccf797 in rtems-libbsd


Ignore:
Timestamp:
Mar 30, 2015, 7:52:17 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
710d2a1
Parents:
8e37837
git-author:
Sebastian Huber <sebastian.huber@…> (03/30/15 07:52:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/01/15 07:15:28)
Message:

Fix maxid and maxcpus sysctls

This prevents an infinte loop in netstat -m on SMP configurations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-bsd-init.c

    r8e37837 r4ccf797  
    7878    "Kernel SMP");
    7979
    80 static int one = 1;
     80static int maxid_maxcpus;
    8181
    82 SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD|CTLFLAG_CAPRD, &one, 0,
    83     "Max CPU ID.");
     82SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD|CTLFLAG_CAPRD,
     83    &maxid_maxcpus, 0, "Max CPU ID.");
    8484
    85 SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD, &one,
    86     0, "Max number of CPUs that the system was compiled for.");
     85SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD,
     86    &maxid_maxcpus, 0, "Max number of CPUs that the system was compiled for.");
    8787
    8888rtems_status_code
     
    9595        tick = 1000000 / hz;
    9696        maxusers = 1;
     97        maxid_maxcpus = (int) rtems_get_processor_count();
    9798
    9899        gettimeofday(&boottime, NULL);
Note: See TracChangeset for help on using the changeset viewer.