Changeset 00ee241 in rtems-libbsd for libbsd.txt
- Timestamp:
- 03/27/12 18:51:45 (12 years ago)
- Branches:
- 4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
- Children:
- 27ae2dfc
- Parents:
- 9fe8c97
- git-author:
- Joel Sherrill <joel.sherrill@…> (03/27/12 18:51:45)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (03/27/12 18:52:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libbsd.txt
r9fe8c97 r00ee241 273 273 274 274 XXX This needs more details. 275 276 === SYSCTL_NODE Example 277 278 During development, we had an undefined reference to 279 _bsd_sysctl__net_children that we had trouble tracking down. Thanks to 280 Chris Johns, we located it. He explained how to read SYSCTL_NODE 281 definitions. This line from freebsd/netinet/in_proto.c is attempting 282 to add the "inet" node to the parent node "_net". 283 284 [listing] 285 ---- 286 SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0, 287 "Internet Family"); 288 ---- 289 290 Our problem was that we could not find where _bsd_sysctl__net_children 291 was defined. Chris suggested that when in doubt compile with -save-temps 292 and look at the preprocessed .i files. But he did not need that. He 293 explained that this the symbol name _bsd_sysctl__net_children was 294 automatically generated by a SYSCTL_NODE as follows: 295 296 * _bsd_ - added by RTEMS modifications to SYSCTL_NODE macro 297 * sysctl_ - boilerplace added by SYSCTL_NODE macro 298 * "" - empty string for parent node 299 * net - name of SYSCTL_NODE 300 * children - added by SYSCTL macros 301 302 This was all generated by a support macro declaring the node as this: 303 304 [listing] 305 ---- 306 struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name); 307 ---- 308 309 Given this information, we located this SYSCTL_NODE declaration in 310 kern/kern_mib.c 311 312 [listing] 313 ---- 314 SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW, 0, 315 "High kernel, proc, limits &c"); 316 ---- 317
Note: See TracChangeset
for help on using the changeset viewer.