Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Any tips/suggestions for a newbie beginning to read the Linux Kernel Source Code Post 302461664 by clavian on Tuesday 12th of October 2010 01:55:47 AM
Old 10-12-2010
Any tips/suggestions for a newbie beginning to read the Linux Kernel Source Code

Hi All,

I recently downloaded the Linux kernel source code, added them all to a project in MS VC++ and plan to read through it so that I can improve the way I code, read/understand a large code database and hopefully contribute something to the development of the Linux OS.

I have taken a couple of courses in OS's and have completed a few projects that included multi-threading (POSIX), system calls, virtual memory, interrupts, signals and so on. It's been a while though since I last used them and I'd like to work on those again.

The courses that I worked on involved enhancing a single threaded OS into a multi-threaded one in multiple phases. However, the Linux source code database is huge and I am actually unsure as to how should I go about debugging / executing code, where should I begin looking, what should I expect when I attempt to execute code and so on. I'm sure most of you must have had similar questions when you began so how did you approach it? Any documentation/pointers that I must read will help a lot. Thanks.
 

10 More Discussions You Might Find Interesting

1. Linux

source code for linux

Hi , where can i get free source code for LINUX commands , OS , system calls etc. Thanks Naren (2 Replies)
Discussion started by: naren_chella
2 Replies

2. BSD

Am searching for source code of openBSD kernel..

Hello Friends, Am lakshma reddy, doing my masters, i had some interest in exploring the source code of any open LINUX/UNIX, i searched for that i know i can get it but this time am finding it difficult in doing that. To be frank am new to this UNIX?LINUX platform. I need it since i want to... (1 Reply)
Discussion started by: luckyy
1 Replies

3. UNIX for Advanced & Expert Users

How to read freebsd kernel source?

I got the freebsd kernel source from the first install CD(in directory:\7.0-RELEASE\src\),isn't right? if so,how can i read it? Is there any tools? (1 Reply)
Discussion started by: zhouq3132
1 Replies

4. UNIX for Dummies Questions & Answers

How to read freebsd kernel source?

I got the freebsd kernel source from the first install CD(in directory:\7.0-RELEASE\src\),isn't right? if so,how can i read it? Is there any tools? (4 Replies)
Discussion started by: zhouq3132
4 Replies

5. Shell Programming and Scripting

Linux source code

Unix is written in C. From where u can see the source code of unix or linux (1 Reply)
Discussion started by: pritish.sas
1 Replies

6. Fedora

Newbie at Linux Kernel programming!

Hi Friends, This is my first ever post on this forum. I am a new user in the Linux field. Although, I have been working for sometime with CentOS at my work, I would consider myself an amateur only in this field. :D The way file system works in linux and the reason its open-source, has really... (7 Replies)
Discussion started by: rohitrajjain
7 Replies

7. BSD

BSD Kernel Source Code

Hi I need the BSD core (kernel) operating system Please let me download link I'm from Iran Please help me Thank you very much (1 Reply)
Discussion started by: sepadl71
1 Replies

8. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

9. Programming

Linux kernel code syntax doubt

I have found some definitions as below, can anyone explain me what it means and why it is being used this way please. asmlinkage void __sched schedule(void) (4 Replies)
Discussion started by: kumaran_5555
4 Replies

10. Linux

Create a bootable PXE image from build kernel source code

Hi, Can i just ask how I can create a bootable PXE image from the built kernel source. What files do I need to get? Thanks! (1 Reply)
Discussion started by: h0ujun
1 Replies
getnetgrent(3C) 					   Standard C Library Functions 					   getnetgrent(3C)

NAME
getnetgrent, getnetgrent_r, setnetgrent, endnetgrent, innetgr - get network group entry SYNOPSIS
#include <netdb.h> int getnetgrent(char **machinep, char **userp, char **domainp); int getnetgrent_r(char **machinep, char **userp, char **domainp, char *buffer, intbuflen); int setnetgrent(const char *netgroup); int endnetgrent(void); int innetgr(const char *netgroup, const char *machine, const char *user, const char *domain); DESCRIPTION
These functions are used to test membership in and enumerate members of ``netgroup'' network groups defined in a system database. Net- groups are sets of (machine,user,domain) triples (see netgroup(4)). These functions consult the source specified for netgroup in the /etc/nsswitch.conf file (see nsswitch.conf(4)). The function innetgr() returns 1 if there is a netgroup netgroup that contains the specified machine, user, domain triple as a member; otherwise it returns 0. Any of the supplied pointers machine, user, and domain may be NULL, signifying a "wild card" that matches all val- ues in that position of the triple. The innetgr() function is safe for use in single-threaded and multithreaded applications. The functions setnetgrent(), getnetgrent(), and endnetgrent() are used to enumerate the members of a given network group. The function setnetgrent() establishes the network group specified in the parameter netgroup as the current group whose members are to be enumerated. Successive calls to the function getnetgrent() will enumerate the members of the group established by calling setnetgrent(); each call returns 1 if it succeeds in obtaining another member of the network group, or 0 if there are no further members of the group. When calling either getnetgrent() or getnetgrent_r(), addresses of the three character pointers are used as arguments, for example: char *mp, *up, *dp; getnetgrent(&mp, &up, &dp); Upon successful return from getnetgrent(), the pointer mp points to a string containing the name of the machine part of the member triple, up points to a string containing the user name and dp points to a string containing the domain name. If the pointer returned for mp, up, or dp is NULL, it signifies that the element of the netgroup contains wild card specifier in that position of the triple. The pointers returned by getnetgrent() point into a buffer allocated by setnetgrent() that is reused by each call. This space is released when an endnetgrent() call is made, and should not be released by the caller. This implementation is not safe for use in multi-threaded applications. The function getnetgrent_r() is similar to getnetgrent() function, but it uses a buffer supplied by the caller for the space needed to store the results. The parameter buffer should be a pointer to a buffer allocated by the caller and the length of this buffer should be specified by the parameter buflen. The buffer must be large enough to hold the data associated with the triple. The getnetgrent_r() func- tion is safe for use both in single-threaded and multi-threaded applications. The function endnetgrent() frees the space allocated by the previous setnetgrent() call. The equivalent of an endnetgrent() implicitly performed whenever a setnetgrent() call is made to a new network group. Note that while setnetgrent() and endnetgrent() are safe for use in multi-threaded applications, the effect of each is process-wide. Call- ing setnetgrent() resets the enumeration position for all threads. If multiple threads interleave calls to getnetgrent_r() each will enu- merate a disjoint subset of the netgroup. Thus the effective use of these functions in multi-threaded applications may require coordination by the caller. ERRORS
The function getnetgrent_r() will return 0 and set errno to ERANGE if the length of the buffer supplied by caller is not large enough to store the result. See Intro(2) for the proper usage and interpretation of errno in multi-threaded applications. The functions setnetgrent() and endnetgrent() return 0 upon success. FILES
/etc/nsswitch.conf ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |See DESCRIPTION section. | +-----------------------------+-----------------------------+ SEE ALSO
Intro(2), Intro(3), netgroup(4), nsswitch.conf(4), attributes(5) WARNINGS
The function getnetgrent_r() is included in this release on an uncommitted basis only, and is subject to change or removal in future minor releases. NOTES
Only the Network Information Services, NIS and NIS+, are supported as sources for the netgroup database. When compiling multi-threaded applications, see Intro(3), Notes On Multithread Applications, for information about the use of the _REEN- TRANT flag. SunOS 5.11 5 Apr 2004 getnetgrent(3C)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy