<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Briefbox</title>
	<atom:link href="http://briefbox.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://briefbox.wordpress.com</link>
	<description>A computer scientist's bLog</description>
	<lastBuildDate>Wed, 03 Dec 2008 19:20:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='briefbox.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Briefbox</title>
		<link>http://briefbox.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://briefbox.wordpress.com/osd.xml" title="Briefbox" />
	<atom:link rel='hub' href='http://briefbox.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Linux kernel proper locking &#8211; generalities</title>
		<link>http://briefbox.wordpress.com/2008/11/29/proper-locking-generalities/</link>
		<comments>http://briefbox.wordpress.com/2008/11/29/proper-locking-generalities/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 16:17:37 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[proper locking]]></category>
		<category><![CDATA[reader/writer lock]]></category>
		<category><![CDATA[semaphore]]></category>
		<category><![CDATA[spinlock]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=160</guid>
		<description><![CDATA[While having some daunting tasks within printing industry I&#8217;ve decided to have some relax (in some working hours break, obviously) grasping, and remembering about proper-locking techniques in Linux kernel as follows: Facts and issues: It provides code path (critical sections) syncronization in context of concurrency, and re-entrancy. Any code that does not have re-entrancy, or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=160&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While having some daunting tasks within printing industry I&#8217;ve decided to have some relax (in some working hours break, obviously) grasping, and remembering about proper-locking techniques in Linux kernel as follows:</p>
<p><strong><span style="text-decoration:underline;">Facts and issues:</span></strong></p>
<ol>
<li>It provides code path (critical sections) syncronization in context of concurrency, and re-entrancy. Any code that does not have re-entrancy, or concurrency protection will encounter the so called <em>race conditions</em></li>
<li>True concurrency is encountered in symmetric multiprocessing systems (SMP hardware with SMP kernel in this case), but pseudo concurency that may lead to race conditions are give by interrupt handlers, and preemptibile kernels also. In later case different code is not actually executed in the same time (having one CPU), but accesing shared data may cause race conditions.</li>
<li>SMP and UP (uniprocessor) linux kernels are kept distinct. Some locks exists in one type, but not in the other.  Though, developer should not care because at compile time some checkings, and translations are performed. Proper locking allways should be performed.</li>
</ol>
<p><span style="text-decoration:underline;"><strong>Methods:</strong></span></p>
<p><span style="text-decoration:underline;"><strong></strong></span><br />
<span style="text-decoration:underline;">1. Atomic operators  (uninterruptible operations) </span></p>
<blockquote>
<ul>
<li>atomic_set(), atomic_inc(), atomic_dec(), and others.</li>
</ul>
</blockquote>
<p><span style="text-decoration:underline;">2. Spinlocks</span></p>
<blockquote>
<ul>
<li>They are defined in <strong>include/linux/spinlock.h</strong></li>
<li>when  code tries to acquire an unavailable spinlock, the process will continue trying (spinning) until the lock becames available. Obviously it&#8217;s eating CPU and the process is not allowed to sleep.</li>
<li>API:
<ul>
<li>spinlock_irqsave(&amp;spinlock_t, unsigned long), spinlock_irqrestore(.same.), SMP safe, and interrupt handlers safe.</li>
<li>spin_lock(spinlock_t), spin_unlock(spinlock_t) used basically for user-context kernel code unique data (in syscalls), no interaction with interrupts.</li>
<li>spin_lock_bh(), spin_unlock_bh(), standard spinlock that disables software interrupts</li>
<li>some other, check the code</li>
</ul>
</li>
<li>when using spinlocks don&#8217;t call from inside a critical section code that may sleep <img src='http://s2.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  You&#8217;r kernel will definetly explode <img src='http://s2.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . (ie copy_from{to}_user(), kmalloc(GPF_KERNEL) etc)</li>
<li>don&#8217;t protect code that takes much time to execute. In fact, protect only shared data if it&#8217;s possible.</li>
</ul>
</blockquote>
<p><span style="text-decoration:underline;">3. Semaphores:</span></p>
<blockquote>
<ul>
<li>It&#8217;s defined in <strong>include/asm/semaphore.h</strong></li>
<li>When execution encounters a code section locked by a semaphore, the task will sleep, not spin <img src='http://s2.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ,  therefore semaphores are used when spinlocks  are not possible.</li>
<li>As semaphores are sleeping locks (not spinning), task context switch happens and much time is wasted, so semaphores are not used with code that takes short time to execute.</li>
<li><em>struct semaphore</em> that describes a semaphore contains an usage count and a list with waiting tasks. Usage count is initialized at semaphore creation and represents the number of tasks that may concurently acquire the semaphore.</li>
<li>A semaphore with usage count  equal with  1 is called a<strong> mutex</strong></li>
<li>API:
<ul>
<li>sem_init(struct semaphore &amp;, int usage_count),</li>
<li>down(semaphore&amp;), puts task in uninterruptible sleep if usage count  is less or equal with 0. After aquiring the semaphore,it decreases the usage count. Marks the begining of critical section.</li>
<li>up(semaphore&amp;), increases the usage count, marks the end of critical section.</li>
<li>down_interruptibile(sempahore&amp;), returns &gt; 0 if semaphore was not acquired, else  is like down(), but is interruptibile</li>
</ul>
</li>
</ul>
</blockquote>
<p><span style="text-decoration:underline;">4. Reader/Writer locks:</span></p>
<blockquote>
<ul>
<li>Are are variants of spinlocks, or semaphores.</li>
<li>They allows multiple concurently readers, or one single writer with no readers</li>
<li>Reader/Writer spinlock:
<ul>
<li>
<pre class="programlisting">rwlock_t mr_rwlock = RW_LOCK_UNLOCKED;
read_lock(&amp;mr_rwlock);
/* critical section (read only) ... */
read_unlock(&amp;mr_rwlock);
write_lock(&amp;mr_rwlock);
/* critical section (read and write) ... */
write_unlock(&amp;mr_rwlock);</pre>
</li>
</ul>
</li>
</ul>
<ul>
<li>Reader/Writer semaphore
<ul>
<li>
<pre class="programlisting">struct rw_semaphore mr_rwsem;
init_rwsem(&amp;mr_rwsem);
down_read(&amp;mr_rwsem);
/* critical region (read only) ... */
up_read(&amp;mr_rwsem);
down_write(&amp;mr_rwsem);
/* critical region (read and write) ... */
up_write(&amp;mr_rwsem);</pre>
</li>
</ul>
</li>
</ul>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=160&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/11/29/proper-locking-generalities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Cosmopolitanism and Corporate ideology &#8211; part 1</title>
		<link>http://briefbox.wordpress.com/2008/11/08/cosmopolitanism-and-corporate-ideology/</link>
		<comments>http://briefbox.wordpress.com/2008/11/08/cosmopolitanism-and-corporate-ideology/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 18:44:36 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[consultancy]]></category>
		<category><![CDATA[corporate ideology]]></category>
		<category><![CDATA[cosmopolitanism]]></category>
		<category><![CDATA[international system]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=146</guid>
		<description><![CDATA[I will explain Cosmopolitanism first, which is one part of the Cosmopolitanism/Communitarianism dichotomy. This dichotomy stays at the fondation of our International system and world order. In the same time the corporation and its ideology has at base cosmopolitanist ideas. This is my personal opinion and it is presented here. So, let us embark to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=146&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I will explain Cosmopolitanism first, which is one part of the Cosmopolitanism/Communitarianism dichotomy. This dichotomy stays at the fondation of our International system and world order.</p>
<p>In the same time the corporation and its ideology has at base cosmopolitanist ideas. This is my personal opinion and it is presented here.</p>
<p>So, let us embark to a trip back in time, 2500 years ago in ancient Greece.</p>
<p>At that time, the world was that of the independent city-states. They were not aware in their daily life about countries, or empires. In their understanding, the meaning and essence of life was the city (you should read here &#8211; <strong><em>polis</em></strong>).  All religious, social, and political activity of people had at its center the city. Whatever was outside the polis, were considered either beasts, or gods. Try to imagine!</p>
<p>So, the meaning, and essence of life was the polis. The city was their Universe, and the value of life was stemming out from the city. The polis was the source of value.</p>
<p>But what happend when the macedoneans got in the scene and conquered the independent cities ? That happend at 338BC, after the battle of Chaeronea. Their view about world entered into a deep crisis. They couldn&#8217;t explain anymore the reason of world and life for a while, now they were making part into an empire.</p>
<p>The system of reference that made their life morally meaningful, being a free citizen of polis dissapeared, as cities lost their independence. While moral and political crisis was deepening a new religous atitude emerged in purpose of making their life meaningful. <strong>It was the Stoicism. </strong></p>
<p>The differences between men of different cities were not taken into consideration anymore, as it was in the old World Order. Human nature was a part cosmic nature governed by the divine law of nature.  <strong><em>&#8220;There is</em></strong><strong><em> one divine universe, one rational human nature, and therefore one appropriate attitude to all men&#8221;. </em></strong>The Stoic was the citizen of the <em><strong>cosmos, </strong></em>not of the polis,and the attitude that was been cultivated since was that<strong> of a citizen of the one universal city.</strong> That citizen <strong>is a cosmopolitan</strong>.</p>
<p>There is one thing that deserves to be mentioned. Cosmopolitanism doesn&#8217;t aims to a world governance, or domination. In fact that was the problem, the world governance &#8211; the empire, which generated the Cosmopolitan thought. as a reaction to the old world order collapse.</p>
<p>Being back to our times. I will present in a future post,  how in fact the Cosmopolitanism really shaped our international system.</p>
<p>Stepping in<strong> into corporation&#8217;s ideology</strong>, we all know that a corporation is an international system, that is based on bussines activities. Usually it is a transnational, and transcontinental organization which competes more and more with the main actors of the international arena &#8211; <em><strong>the states.</strong></em></p>
<p>Being an international system actor, the corporation is shaped by the written and unwritten laws of the international system, including by its cosmopolitan/communitarian essence of world order.</p>
<p>Bibliography:</p>
<p>- cosmopolitanism &#8211; &#8220;International Relations Theory, New Normative Approaches&#8221; by Chris Brown,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=146&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/11/08/cosmopolitanism-and-corporate-ideology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Recruiting and Knowledge management</title>
		<link>http://briefbox.wordpress.com/2008/11/05/recruiting-and-knowledge-management/</link>
		<comments>http://briefbox.wordpress.com/2008/11/05/recruiting-and-knowledge-management/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 12:36:58 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[consultancy]]></category>
		<category><![CDATA[knowledge management]]></category>
		<category><![CDATA[human resources]]></category>
		<category><![CDATA[recruiting]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=139</guid>
		<description><![CDATA[I&#8217;ve found a very interesting fact about HR recruiting in conjunction with Knowledge management that deserves to be shared. First you should read about KM strategies to have a base of ideas. So, regarding HR, in some firms the recruiting policies are performed in relation with the KM strategy implemented there. Having this said, it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=139&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found a very interesting fact about HR recruiting in conjunction with Knowledge management that deserves to be shared.  First you should read about <a href="http://briefbox.wordpress.com/2008/11/04/knowledge-management-strategies">KM strategies</a> to have a base of ideas.</p>
<p>So, regarding HR,  in some firms the recruiting policies are performed in relation with the KM strategy implemented there.</p>
<p>Having this said, it must be stressed out two kinds of recruiting policies depending of the type of KM.</p>
<p>If the <span style="text-decoration:underline;">KM is centralized</span>, candidates are selected based on &#8220;hard&#8221; skills.  It&#8217;s mandatory for a candidate to have a skill portfolio defined in terms of knowledge goals. This is a <strong>hard-skills-oriented recruiting policy</strong>.</p>
<p>As it&#8217;s logically, if the performed <span style="text-decoration:underline;">KM is de-centralized</span>, the recruiting policy is oriented to &#8220;soft&#8221; skills candidates, as the knowledge system is implemented through networking of individuals. To conlude, this is a <strong>soft-skills-oriented recruiting policy</strong>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=139&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/11/05/recruiting-and-knowledge-management/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Knowledge management strategies</title>
		<link>http://briefbox.wordpress.com/2008/11/04/knowledge-management-strategies/</link>
		<comments>http://briefbox.wordpress.com/2008/11/04/knowledge-management-strategies/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 13:17:13 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[consultancy]]></category>
		<category><![CDATA[knowledge management]]></category>
		<category><![CDATA[strategy]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=126</guid>
		<description><![CDATA[The article is business oriented, but the essence of ideas can be disseminated in conjunction with other kind of activities, such as from academic environments, or from any organizations where a state of knowledge is present. So, a Knowledge Management (KM) strategy is a pragmatic practice, developed from overall business strategy, having its goals and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=126&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The article is business oriented, but the essence of ideas can be disseminated in conjunction with other kind of activities, such as from academic environments, or from any organizations where a state of knowledge is present.</p>
<p>So, a Knowledge Management (KM) strategy is a pragmatic practice, developed from overall business strategy, having its goals and characterized by its methods and techniques.  Since 1995, it has been <span style="text-decoration:underline;">a distinct discipline </span>and it&#8217;s being thought at good Universities.</p>
<p>Furthermore large companies, and especially corporations have resources dedicated to KM, which is a part of HR, IT&amp;C, and <span style="text-decoration:underline;">Business Strategy</span> department.</p>
<p>Basic KM strategy has 3 sub-processes:</p>
<ul>
<li>Knowledge generation</li>
<li>Knowledge maintenance</li>
<li>Knowledge distribution,</li>
</ul>
<p>and are performed in <span style="text-decoration:underline;">a central or de-central way</span>, in relation with business type. The obvious purpose is to <span style="text-decoration:underline;">codify, store, disseminate</span>, and <strong>allow reuse of knowledge</strong>.</p>
<p>Codifying tasks are usually a done using <strong><em>a  person-to-document approach</em>,</strong> the resulting document being extracted from the person who developed it, it&#8217;s made independent of it, and finally re-used for different purposes.</p>
<p>Ancillary, an IT management system is established, for instance a distributed database of documents with a fancy, easy to use, intuitive GUI. In this case the system is a top-down system, with a centralized KM approach because the knowledge is disseminated from one central point (the database) to individual requestors.</p>
<p>Another strategic approach is to make the knowledge management de-centrally. The KM sub processes are performed de-centralized. In this case, the knowledge is closely  tied to persons who acquired it. In this context the dissemination of knowledge is done using <strong><em>a person-to-person approach</em></strong> while networks of individuals are made. In fact the entire KM system is implemented by networks of individuals, based on their initiative, not on a clear managerial task.  It&#8217;s obvious that it does not cost and it&#8217;s the often encountered KM system in firms.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=126&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/11/04/knowledge-management-strategies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a static library using C</title>
		<link>http://briefbox.wordpress.com/2008/10/22/quick-static-library-with-c/</link>
		<comments>http://briefbox.wordpress.com/2008/10/22/quick-static-library-with-c/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 12:35:42 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[C language]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux application]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=114</guid>
		<description><![CDATA[Before you start doing your library you should be clear about three concepts: type of linkage (internal, external, and no linkage) type of objects (internal, and external) scope (per function, per program, &#8230;) , and good explanations you find at this location =&#62; Linkage &#60;= . Ok, let&#8217;s assume that you already have a libheader.h, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=114&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before you start doing your library you should be clear about three concepts:</p>
<ul>
<li><span style="text-decoration:underline;">type of linkage</span> (internal, external, and no linkage)</li>
<li>type of objects (internal, and external)</li>
<li><span style="text-decoration:underline;">scope</span> (per function, per program, &#8230;)</li>
</ul>
<p>, and good explanations you find at this location =&gt; <span style="color:#ff0000;"><strong><a href="http://publications.gbdirect.co.uk/c_book/chapter4/linkage.html">Linkage</a></strong></span> &lt;= .</p>
<p>Ok, let&#8217;s assume that you already have a <span style="text-decoration:underline;">libheader.h</span>, and a <span style="text-decoration:underline;">libdeclared.c</span> files, where in the first one you have all your definitions, and in the second your program declarations.</p>
<p>Compiling and  assembling your library is simple and performed with <strong>gcc</strong>, obviously! The proper command to do it is:</p>
<p style="padding-left:30px;"><strong>gcc -g -c -Wall libdeclared.c</strong> # it will produce a <span style="text-decoration:underline;">libdeclared.o</span> file<strong></strong></p>
<p>Now you have an object file and must create an archive with your lib:</p>
<p style="padding-left:30px;"><strong>ar rcs libdeclared.a libdeclared.o</strong></p>
<p>Good, now you have a static library and you wish to see what objects does your lib has:</p>
<p style="padding-left:30px;"><strong>nm -s libdeclared.a</strong></p>
<p>So, using your library is quite simple and looks like this:</p>
<p style="padding-left:30px;"><strong>gcc -o &lt;your_binary_file&gt; &lt;your_file.c&gt; -L&lt;<em>directory_of_your_lib&gt;</em> &lt;yourlib.a</strong>&gt;</p>
<p>Enjoy now!</p>
<p style="padding-left:30px;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=114&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/10/22/quick-static-library-with-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Consultant what?</title>
		<link>http://briefbox.wordpress.com/2008/10/05/consultant/</link>
		<comments>http://briefbox.wordpress.com/2008/10/05/consultant/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 20:05:51 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[consultancy]]></category>
		<category><![CDATA[consultant]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=105</guid>
		<description><![CDATA[Some of you have heard about consultants, but don&#8217;t have a broad understanding about their activity. So, I&#8217;m giving you a scientific view: &#8211; A consultant is a highly professional individual, helping one, ore more organizations to develop ultra-competent teams engaged in complex activities. He can be an internal, or external actor, collaborating directly with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=105&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some of you have heard about consultants, but don&#8217;t have a broad understanding about their activity. So, I&#8217;m giving you a scientific view:</p>
<p>&#8211;</p>
<p><strong>A consultant</strong> <span style="text-decoration:underline;">is a highly professional individual</span>, helping one, ore more organizations to develop ultra-competent teams engaged in complex activities.  He can be an internal, or external actor, collaborating directly with superior management, human resources departament and the teams.</p>
<p><strong>The role</strong> of a such person is to have a comprehensive perspective about the activity of the organization, or team, and discuss its improvements.</p>
<p><strong>Selecting consultants</strong> is usualy performed by the higher management and human resources department.</p>
<p>Selection process consists in a set of evaluation steps like:</p>
<ol>
<li>Evaluate if he has <span style="text-decoration:underline;">a result oriented personality.</span> In other words, he shouldn&#8217;t cope only with group relations and processes, He should tackle the real problems that organization, or team has, and improve activity.</li>
<li>Test if he can quick <span style="text-decoration:underline;">obtain the higher management credibility</span> and if they are satisfied with him. Will the management take its advice as a good one? Could he influence them using its expertise?</li>
<li>Evaluate if he <span style="text-decoration:underline;">can have a proactive influence</span> and <span style="text-decoration:underline;">collaborate with team(s) leader(s) </span>and basic members and improve the main activity.</li>
<li>Evaluate if <span style="text-decoration:underline;">he is able to halt the current activity flow</span> if it&#8217;s needed. A consultant links its name of the  client&#8217;s success and based on its experience he shouldn&#8217;t let continue an activity which goes towards failure, or a mediocre result</li>
</ol>
<p><em>&#8211;bibliography -  &#8220;The GOWER Management Manual&#8221;<br />
</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=105&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/10/05/consultant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Double linked lists</title>
		<link>http://briefbox.wordpress.com/2008/10/03/double-linked-lists/</link>
		<comments>http://briefbox.wordpress.com/2008/10/03/double-linked-lists/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 14:29:42 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[beginer]]></category>
		<category><![CDATA[double linked list]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=82</guid>
		<description><![CDATA[Kernel has a good implementation of double linked lists and objectives in this post are to emphasize how can you do the following list operations: Defining/Declaring and Initializing Passing through Addition and deletion of elements The linked list API is located in include/linux/list.h and the basic MACROs and functions that you need to know about [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=82&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Kernel has a good implementation of double linked lists and objectives in this post are to emphasize how can you do the following list operations:</p>
<ul>
<li>Defining/Declaring and Initializing</li>
<li>Passing through</li>
<li>Addition and deletion of elements</li>
</ul>
<p>The linked list API is located in <span style="text-decoration:underline;"><tt>include/linux/list.h </tt></span><tt>and the basic MACROs and functions that you need to know about are:</tt></p>
<ul>
<li>
<pre>INIT_LIST_HEAD()</pre>
</li>
<li>
<pre>list_add(), list_entry(), and list_del()</pre>
</li>
<li>list_for_each() and list_for_each_safe()</li>
</ul>
<p>The first thing you should do when you want to use a linked list, is to declare and declare your list node data type. In this case the node is different than any linked list node that you may know outside the kernel.</p>
<p>Therefore a double linked list node would seem like:</p>
<pre><span style="color:#990000;">struct</span> person<strong><span style="color:#663300;"> {</span></strong><span style="color:#ff6633;">
	char</span> name<strong><span style="color:#663300;">[</span></strong><span style="color:#999900;">64</span><strong><span style="color:#663300;">];</span></strong><em></em>
<em><span style="color:#999999;">	// ..
</span></em><span style="color:#990000;">
	struct</span> person<strong><span style="color:#663300;"> *</span></strong>next<strong><span style="color:#663300;">;</span></strong><span style="color:#990000;">
        struct</span> person<strong><span style="color:#663300;"> *</span></strong>prev<strong><span style="color:#663300;">;
};</span></strong></pre>
<p>but in <span style="text-decoration:underline;">the kernel way</span> would be as:</p>
<pre><span style="color:#990000;">struct</span> person<strong><span style="color:#663300;"> {</span></strong><span style="color:#ff6633;">
	char</span> *name<strong><span style="color:#663300;">;</span></strong>
<em><span style="color:#999999;">	// ..
</span></em><span style="color:#990000;">
	struct</span> list_head engineers<strong><span style="color:#663300;">;</span></strong><span style="color:#990000;">
        struct</span> list_head managers<strong><span style="color:#663300;">;</span></strong><em><span style="color:#999999;">
        // we can have multiple lists!
</span></em><strong><span style="color:#663300;">};</span></strong><strong>
</strong></pre>
<p><strong>How do we define a linked list?</strong></p>
<p><span style="text-decoration:underline;">Simple:</span></p>
<pre style="padding-left:60px;"><span style="color:#990000;">struct</span> person employees<strong><span style="color:#663300;">;

</span></strong></pre>
<p>Pushing forward towards our objectives, examples of code are:</p>
<p><strong> </strong><span style="text-decoration:underline;">Initializing:</span></p>
<pre style="padding-left:60px;">INIT_LIST_HEAD<strong><span style="color:#663300;">(&amp;</span></strong>employees<strong><span style="color:#663300;">.</span></strong><strong><span style="color:#663300;">engineers);

</span></strong></pre>
<p><span style="text-decoration:underline;">Element addition:</span></p>
<pre style="padding-left:60px;"><span style="color:#990000;">struct</span> person *node<strong><span style="color:#663300;"> = NULL;</span></strong>
node<strong><span style="color:#663300;">=(</span></strong><span style="color:#990000;">struct</span> person<strong><span style="color:#663300;"> *)</span></strong>vmalloc<strong><span style="color:#663300;">(</span></strong><span style="color:#990000;">sizeof</span><strong><span style="color:#663300;">(</span></strong>person<strong><span style="color:#663300;">));</span></strong>
<span style="color:#ff0000;">if</span><strong><span style="color:#663300;"> (!</span></strong>node<strong><span style="color:#663300;">){</span></strong>
   printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "mymodule:vmalloc: could not alocate memory"</span><strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
   return</span><strong><span style="color:#663300;"> -</span></strong>ENOMEM<strong><span style="color:#663300;">;
}</span></strong>
memset<strong><span style="color:#663300;">(</span></strong>node<strong><span style="color:#663300;">,</span></strong><span style="color:#999900;"> 0</span><strong><span style="color:#663300;">,</span></strong><span style="color:#990000;"> sizeof</span><strong><span style="color:#663300;">(</span></strong>person<strong><span style="color:#663300;">));</span></strong>
strcpy<strong><span style="color:#663300;">(</span></strong>node<strong><span style="color:#663300;">-&gt;</span></strong>name<strong><span style="color:#663300;">,</span></strong> person_name<strong><span style="color:#663300;">);</span></strong>

list_add<strong><span style="color:#663300;">(&amp;(</span></strong>node<strong><span style="color:#663300;">-&gt;</span></strong>engineers<strong><span style="color:#663300;">),&amp;(</span></strong>employees<strong><span style="color:#663300;">.</span></strong>engineers<strong><span style="color:#663300;">));

</span></strong></pre>
<p><span style="text-decoration:underline;">Passing through list and deleting an element:</span></p>
<pre style="padding-left:30px;"><span style="color:#990000;">    struct</span> list_head<strong><span style="color:#663300;"> *</span></strong>pos<strong><span style="color:#663300;"> =</span></strong> NULL<strong><span style="color:#663300;">;</span></strong>
<span style="color:#990000;">    struct</span> list_head<strong><span style="color:#663300;"> *</span></strong>q<strong><span style="color:#663300;"> =</span></strong> NULL<strong><span style="color:#663300;">;</span></strong><span style="color:#990000;">
    struct</span> person<strong><span style="color:#663300;"> *</span></strong>node<strong><span style="color:#663300;"> = </span></strong>NULL<strong><span style="color:#663300;">;</span></strong><span style="color:#990000;">
</span>    list_for_each_safe<strong><span style="color:#663300;">(</span></strong>pos<strong><span style="color:#663300;">,</span></strong> q<strong><span style="color:#663300;">, &amp;</span></strong>employees<strong><span style="color:#663300;">.</span></strong>engineers<strong><span style="color:#663300;">) {</span></strong>
            node<strong><span style="color:#663300;">=</span></strong>list_entry<strong><span style="color:#663300;">(</span></strong>pos<strong><span style="color:#663300;">,</span></strong><span style="color:#990000;"> struct</span> person<strong><span style="color:#663300;">,</span></strong> engineers<strong><span style="color:#663300;">);</span></strong>
<span style="color:#ff0000;">            if</span><strong><span style="color:#663300;"> (!</span></strong>strcmp<strong><span style="color:#663300;">(</span></strong>node<strong><span style="color:#663300;">-&gt;</span></strong>name<strong><span style="color:#663300;">,</span></strong> person_name<strong><span style="color:#663300;">)) {</span></strong>
                 list_del<strong><span style="color:#663300;">(</span></strong>pos<strong><span style="color:#663300;">);</span></strong>
                 vfree<strong><span style="color:#663300;">(</span></strong>node<strong><span style="color:#663300;">);
            }
    }

</span></strong></pre>
<p>I hope I haven&#8217;t forgotten, or misplaced anything during code translation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=82&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/10/03/double-linked-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Basic proc file system module</title>
		<link>http://briefbox.wordpress.com/2008/10/02/proc-fs-demo-1/</link>
		<comments>http://briefbox.wordpress.com/2008/10/02/proc-fs-demo-1/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 11:07:38 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[beginer]]></category>
		<category><![CDATA[proc fs]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=43</guid>
		<description><![CDATA[This is an example of proc file system basic usage regarding: adding and removing a directory, or file under proc handling I/O  of proc files Having the proc_demo.ko module inserted into kernel, it will create /proc/{demo, demo/file} under you are able to perform simple I/O like: echo &#8220;what ever you want&#8221; &#62; /proc/demo/file cat /proc/demo/file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=43&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an example of proc file system basic usage regarding:</p>
<ul>
<li>adding and removing a directory, or file under proc</li>
<li>handling I/O  of proc files</li>
</ul>
<p>Having the <span style="text-decoration:underline;">proc_demo.ko</span> module inserted into kernel, it will create /proc/{demo, demo/file} under you are able to perform simple I/O like:</p>
<ul>
<li><em><strong>echo &#8220;what ever you want&#8221; &gt; /proc/demo/file</strong></em></li>
<li><em><strong>cat /proc/demo/file</strong></em></li>
</ul>
<p>Its purpose is to demonstrate the minimal usage of kernel proc API.</p>
<p>You should read <a href="http://briefbox.wordpress.com/2008/10/02/basic-proc-fs-api">Basic proc file system kernel API</a> page first.</p>
<p><strong>proc_demo.c</strong></p>
<pre><span style="color:#000099;">#include &lt;linux/init.h&gt;
#include &lt;linux/kernel.h&gt;
#include &lt;linux/module.h&gt;
#include&lt;linux/vmalloc.h&gt;
#include &lt;linux/string.h&gt;
#include&lt;linux/proc_fs.h&gt;
#include &lt;asm/uaccess.h&gt;
</span>

MODULE_LICENSE<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"GPL"</span><strong><span style="color:#663300;">);</span></strong>

<span style="color:#990000;">static</span><span style="color:#ff6633;"> char</span><strong><span style="color:#663300;"> *</span></strong>file_content<strong><span style="color:#663300;">=</span></strong>NULL<strong><span style="color:#663300;">;</span></strong>
<span style="color:#990000;">static struct</span>   proc_dir_entry<strong><span style="color:#663300;"> *</span></strong>proc_dir<strong><span style="color:#663300;">=</span></strong>NULL<strong><span style="color:#663300;">;</span></strong>
<span style="color:#990000;">static struct</span>   proc_dir_entry<strong><span style="color:#663300;"> *</span></strong>proc_file<strong><span style="color:#663300;">=</span></strong>NULL<strong><span style="color:#663300;">;</span></strong>

ssize_t file_write<strong><span style="color:#663300;">(</span></strong><span style="color:#990000;">struct</span> file<strong><span style="color:#663300;"> *</span></strong>filp<strong><span style="color:#663300;">,</span></strong><span style="color:#990000;"> const</span><span style="color:#ff6633;"> char</span> __user<strong><span style="color:#663300;"> *</span></strong>buff<strong><span style="color:#663300;">,</span></strong>
<span style="color:#ff6633;">		   unsigned long</span> len<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> void</span><strong><span style="color:#663300;"> *</span></strong>data<strong><span style="color:#663300;">);</span></strong>

<span style="color:#ff6633;">int</span> file_read<strong><span style="color:#663300;">(</span></strong><span style="color:#ff6633;">char</span><strong><span style="color:#663300;"> *</span></strong>page<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> char</span><strong><span style="color:#663300;"> **</span></strong>start<strong><span style="color:#663300;">,</span></strong> off_t off<strong><span style="color:#663300;">,</span></strong>
<span style="color:#ff6633;">		int</span> count<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> int</span><strong><span style="color:#663300;"> *</span></strong>eof<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> void</span><strong><span style="color:#663300;"> *</span></strong>data<strong><span style="color:#663300;">);</span></strong>

ssize_t file_write<strong><span style="color:#663300;">(</span></strong><span style="color:#990000;"> struct</span> file<strong><span style="color:#663300;"> *</span></strong>filp<strong><span style="color:#663300;">,</span></strong><span style="color:#990000;"> const</span><span style="color:#ff6633;"> char</span> __user<strong><span style="color:#663300;"> *</span></strong>buff<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;">unsigned long</span> len<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> void</span><strong><span style="color:#663300;"> *</span></strong>data<strong><span style="color:#663300;">)
{</span></strong>
<span style="color:#ff0000;">    if</span><strong><span style="color:#663300;"> (</span></strong>len<strong><span style="color:#663300;">&gt;</span></strong>PAGE_SIZE<strong><span style="color:#663300;">) {</span></strong>
	printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: file_write function len &gt; PAGE_SIZE\n"</span><strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
	return</span><strong><span style="color:#663300;"> -</span></strong>ENOSPC<strong><span style="color:#663300;">;
    }</span></strong>

<span style="color:#ff0000;">    if</span><strong><span style="color:#663300;"> (</span></strong>copy_from_user<strong><span style="color:#663300;">(&amp;</span></strong>file_content<strong><span style="color:#663300;">[</span></strong><span style="color:#999900;">0</span><strong><span style="color:#663300;">],</span></strong> buff<strong><span style="color:#663300;">,</span></strong> len<strong><span style="color:#663300;">))</span></strong>
<span style="color:#ff0000;">	return</span><strong><span style="color:#663300;"> -</span></strong>EFAULT<strong><span style="color:#663300;">;</span></strong>

    file_content<strong><span style="color:#663300;">[</span></strong>len<strong><span style="color:#663300;">]=</span></strong><span style="color:#009900;">'\x0'</span><strong><span style="color:#663300;">;</span></strong>
    printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: you've written: %s\n"</span><strong><span style="color:#663300;">,</span></strong>file_content<strong><span style="color:#663300;">);</span></strong>
<span style="color:#ff0000;">    return</span> len<strong><span style="color:#663300;">;
}</span></strong>

<span style="color:#ff6633;">int</span>  file_read<strong><span style="color:#663300;">(</span></strong><span style="color:#ff6633;"> char</span><strong><span style="color:#663300;"> *</span></strong>page<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> char</span><strong><span style="color:#663300;"> **</span></strong>start<strong><span style="color:#663300;">,</span></strong> off_t off<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;">int</span> count<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> int</span><strong><span style="color:#663300;"> *</span></strong>eof<strong><span style="color:#663300;">,</span></strong><span style="color:#ff6633;"> void</span><strong><span style="color:#663300;"> *</span></strong>data<strong><span style="color:#663300;">)
{</span></strong>
<span style="color:#ff0000;">    return</span> sprintf<strong><span style="color:#663300;">(</span></strong>page<strong><span style="color:#663300;">,</span></strong><span style="color:#009900;">"The user entered:\n%s\n"</span><strong><span style="color:#663300;">,</span></strong>file_content<strong><span style="color:#663300;">),</span></strong>
	    strlen<strong><span style="color:#663300;">(</span></strong>page<strong><span style="color:#663300;">);
}</span></strong>

<span style="color:#990000;">static</span><span style="color:#ff6633;"> int</span> proc_demo_init<strong><span style="color:#663300;">(</span></strong><span style="color:#ff6633;">void</span><strong><span style="color:#663300;">) {</span></strong>

<span style="color:#ff6633;">	int</span>  ret<strong><span style="color:#663300;">=</span></strong><span style="color:#999900;">0</span><strong><span style="color:#663300;">;</span></strong>
<em><span style="color:#999999;">	// We're alloc'ing memory for the file content buffer
</span></em>	file_content<strong><span style="color:#663300;">=(</span></strong><span style="color:#ff6633;">char</span><strong><span style="color:#663300;"> *)</span></strong>vmalloc<strong><span style="color:#663300;">(</span></strong>PAGE_SIZE<strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
	if</span><strong><span style="color:#663300;"> (!</span></strong>file_content<strong><span style="color:#663300;">){</span></strong>
	    printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: vmalloc: could not alocate memory\n"</span><strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
	    goto</span> demo_out<strong><span style="color:#663300;">;
	}</span></strong>

	memset<strong><span style="color:#663300;">(</span></strong>file_content<strong><span style="color:#663300;">,</span></strong><span style="color:#999900;"> 0</span><strong><span style="color:#663300;">,</span></strong> PAGE_SIZE<strong><span style="color:#663300;">);</span></strong>

<em><span style="color:#999999;">        // Creating the proc 'demo' directory
</span></em>	proc_dir<strong><span style="color:#663300;">=</span></strong>proc_mkdir<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"demo"</span><strong><span style="color:#663300;">,</span></strong> NULL<strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
        if</span><strong><span style="color:#663300;"> (!</span></strong>proc_dir<strong><span style="color:#663300;">) {</span></strong>
	    printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: demo directory creation failed\n"</span><strong><span style="color:#663300;">);</span></strong>
            ret<strong><span style="color:#663300;">=-</span></strong>EAGAIN<strong><span style="color:#663300;">;</span></strong><span style="color:#ff0000;">
            goto</span> proc_mkdir_failure<strong><span style="color:#663300;">;
	}</span></strong>

<em><span style="color:#999999;">	/* creating 'file' and setting the read&amp;&amp;write function
	   handlers */</span></em>
	proc_file<strong><span style="color:#663300;">=</span></strong>create_proc_entry<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"file"</span><strong><span style="color:#663300;">,</span></strong><span style="color:#999900;">0600</span><strong><span style="color:#663300;">,</span></strong> proc_dir<strong><span style="color:#663300;">);</span></strong><span style="color:#ff0000;">
        if</span><strong><span style="color:#663300;"> (</span></strong>proc_file<strong><span style="color:#663300;">) {</span></strong>
	    proc_file<strong><span style="color:#663300;">-&gt;</span></strong>read_proc<strong><span style="color:#663300;">  =</span></strong> file_read<strong><span style="color:#663300;">;</span></strong>
	    proc_file<strong><span style="color:#663300;">-&gt;</span></strong>write_proc<strong><span style="color:#663300;"> =</span></strong> file_write<strong><span style="color:#663300;">;</span></strong>
	    proc_file<strong><span style="color:#663300;">-&gt;</span></strong>owner<strong><span style="color:#663300;">      =</span></strong> THIS_MODULE<strong><span style="color:#663300;">;
	}</span></strong><span style="color:#ff0000;">
	else</span><strong><span style="color:#663300;"> {</span></strong>
    	    printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: create_proc_entry: file\n"</span><strong><span style="color:#663300;">);</span></strong>
	    ret<strong><span style="color:#663300;">= -</span></strong>EAGAIN<strong><span style="color:#663300;">;</span></strong><span style="color:#ff0000;">
	    goto</span> proc_file_failure<strong><span style="color:#663300;">;
	}</span></strong>

	printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: succesfully loaded\n"</span><strong><span style="color:#663300;">);</span></strong>
<span style="color:#ff0000;">        return</span> ret<strong><span style="color:#663300;">;</span></strong>
proc_file_failure<strong><span style="color:#663300;">:</span></strong>
	remove_proc_entry<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"demo"</span><strong><span style="color:#663300;">,</span></strong> NULL<strong><span style="color:#663300;">);</span></strong>
proc_mkdir_failure<strong><span style="color:#663300;">:</span></strong>
	vfree<strong><span style="color:#663300;">(</span></strong>file_content<strong><span style="color:#663300;">);</span></strong>
demo_out<strong><span style="color:#663300;">:</span></strong>
	printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: not loaded loaded\n"</span><strong><span style="color:#663300;">);</span></strong>
<span style="color:#ff0000;">	return</span> ret<strong><span style="color:#663300;">;
}</span></strong>

<span style="color:#990000;">static</span><span style="color:#ff6633;"> void</span> proc_demo_exit<strong><span style="color:#663300;">(</span></strong><span style="color:#ff6633;">void</span><strong><span style="color:#663300;">) {</span></strong>

        remove_proc_entry<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"file"</span><strong><span style="color:#663300;">,</span></strong>proc_dir<strong><span style="color:#663300;">);</span></strong>
	remove_proc_entry<strong><span style="color:#663300;">(</span></strong><span style="color:#009900;">"demo"</span><strong><span style="color:#663300;">,</span></strong> NULL<strong><span style="color:#663300;">);</span></strong>

<span style="color:#ff0000;">	if</span><strong><span style="color:#663300;"> (</span></strong>file_content<strong><span style="color:#663300;">)</span></strong>
	    vfree<strong><span style="color:#663300;">(</span></strong>file_content<strong><span style="color:#663300;">);</span></strong>

	printk<strong><span style="color:#663300;">(</span></strong>KERN_INFO<span style="color:#009900;"> "proc_demo module: unloaded.\n"</span><strong><span style="color:#663300;">);
}</span></strong>

module_init<strong><span style="color:#663300;">(</span></strong>proc_demo_init<strong><span style="color:#663300;">);</span></strong>
module_exit<strong><span style="color:#663300;">(</span></strong>proc_demo_exit<strong><span style="color:#663300;">);
</span></strong></pre>
<p>Regarding a <strong>Makefile</strong> you can find a good example <a href="http://briefbox.wordpress.com/2008/09/29/first-linux-loadable-kernel-module">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=43&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/10/02/proc-fs-demo-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Basic proc file system kernel API</title>
		<link>http://briefbox.wordpress.com/2008/10/02/basic-proc-fs-api/</link>
		<comments>http://briefbox.wordpress.com/2008/10/02/basic-proc-fs-api/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 11:02:58 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[beginer]]></category>
		<category><![CDATA[proc fs]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=23</guid>
		<description><![CDATA[Proc fs is a virtual file system mounted in /proc directory which has at least two functions: Exporting kernel state to user-space. It&#8217;s like a kernel&#8217;s point of view about the system. Communicating particular configuration to the kernel on the fly.  It&#8217;s an interface to kernel components through which a system operator can interactive modify [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=23&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Proc fs is a virtual file system mounted in <strong>/proc directory</strong> which has <span style="text-decoration:underline;">at least two functions</span>:</p>
<ul>
<li><span style="text-decoration:underline;">Exporting kernel state</span> to user-space. It&#8217;s like a kernel&#8217;s point of view about the system.</li>
<li><span style="text-decoration:underline;">Communicating particular configuration to the kernel</span> on the fly.  It&#8217;s an interface to kernel components through which a system operator can interactive modify system behavior.</li>
</ul>
<p><strong>Shell commands</strong> that are common used with proc are: <strong>cat, echo </strong>and<strong> less</strong>. Examples of its usage could be:</p>
<ul>
<li> See system devices:
<pre style="padding-left:90px;">cat /proc/devices</pre>
</li>
<li>Enable IPv4 forwarding:
<pre style="padding-left:90px;">echo<span class="int"> 1</span><span class="operator"> &gt;/</span>proc<span class="operator">/</span>sys<span class="operator">/</span>net<span class="operator">/</span>ipv4<span class="operator">/</span>ip_forward</pre>
</li>
</ul>
<p>Now having enough about what we should know about operating proc from user space it is the moment to see how things are really done into kernel space.</p>
<p><span style="text-decoration:underline;">Two main files</span> from kernel source tree that you should inspect to see some <span style="text-decoration:underline;">proc API functions</span> are:</p>
<ul>
<li>fs/proc/generic.c</li>
<li>include/linux/proc_fs.h</li>
</ul>
<p>Doing some Linux Cross Reference code search about <strong>proc_mkdir</strong> , <strong>create_proc_entry, </strong>and<strong> remove_proc_entry </strong>you will find that the kernel API is simple and <span style="text-decoration:underline;">their function signatures</span> are like this:</p>
<pre style="padding-left:60px;"><strong><span class="keyword">struct</span> proc_dir_entry<span class="operator"> *</span>proc_mkdir
                      <span class="operator">(</span><span class="keyword">const</span><span class="type"> char</span><span class="operator"> *</span>name<span class="operator">,
                       </span><span class="keyword">struct</span> proc_dir_entry<span class="operator"> *</span>parent)

struct proc_dir_entry *create_proc_entry
                      (const char *name, mode_t mode,
                        struct proc_dir_entry *parent)</strong>

<strong>void remove_proc_entry</strong>(<strong>const char *name,struct proc_dir_entry *parent)

</strong></pre>
<p>At this point is intuitive how we can create, or destroy directories and files under proc file system, but how do we <span style="text-decoration:underline;">process their I/O</span>? The answer is like this: &#8220;Using a <span style="text-decoration:underline;">proc read and a proc write function</span> setup using the resulting <strong>struct proc_dir_entry*</strong> after we link in the desired file.&#8221;</p>
<p><span style="text-decoration:underline;">By a proc read function</span> you should understand a function used by kernel to process data when a /proc file is read from user space; usually performed in the reader user process context; and <span style="text-decoration:underline;">by a proc write function</span> a function that is used by the kernel to process data when someone writes in a proc file.</p>
<p><span style="text-decoration:underline;">proc read and write function</span>s have <strong>the prototype</strong> as follows:</p>
<pre><strong>    int func_read(char *buffer, char **start, off_t offset,
             *int count, int *peof, void *dat)</strong></pre>
<pre style="padding-left:30px;"><strong>ssize_t func_write(struct file *filp, const char __user *buff,
                   unsigned long len, void *data)

</strong></pre>
<p>Furthermore, you can find a good example at <a href="http://briefbox.wordpress.com/2008/10/02/proc-fs-demo-1">Basic proc file system module </a> page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=23&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/10/02/basic-proc-fs-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Cross-referencing the linux kernel sources</title>
		<link>http://briefbox.wordpress.com/2008/09/30/corss-referencing-linux-source/</link>
		<comments>http://briefbox.wordpress.com/2008/09/30/corss-referencing-linux-source/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 13:13:12 +0000</pubDate>
		<dc:creator>Catalin</dc:creator>
				<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[beginer]]></category>

		<guid isPermaLink="false">http://briefbox.wordpress.com/?p=19</guid>
		<description><![CDATA[In process of  exploring whatever corner of Linux kernel source tree it is cute to consult the sources using some automated search system. Cross reference Linux Project provides a good solution of what you need.  It&#8217;s a versatile cross-referencing tool for relatively large code repositories. So, LXR (formerly &#8220;the Linux Cross Referencer&#8220;) and some of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=19&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In process of  exploring whatever corner of Linux kernel source tree it is cute to consult the sources using some automated search system. <strong>Cross reference Linux Project</strong> provides a good solution of what you need.  It&#8217;s a versatile cross-referencing tool for relatively large code repositories.</p>
<p>So, <strong>LXR</strong> (formerly &#8220;<strong><em>the Linux Cross Referencer</em></strong>&#8220;) and some of its forks may be your good friend.  One instance can be found here <a href="http://lxr.linux.no"> http://lxr.linux.no</a></p>
<p>Google&#8217;ing after <strong><em>Linux Cross Reference Source</em></strong> phrase you will find some good sites where the kernel sources are indexed.</p>
<p>Good examples could be:</p>
<ul>
<li><a href="http://www.linux-m32r.org/lxr/http/source/">http://www.linux-m32r.org/lxr/http/source</a></li>
<li><a href="http://users.sosdg.org/~qiyong/lxr/source/">http://users.sosdg.org/~qiyong/lxr/source/</a></li>
<li><a href="http://fxr.watson.org/">http://fxr.watson.org</a></li>
</ul>
<p>Ups, that last link is devilish!</p>
<p><span style="text-decoration:underline;">Basic things</span> that you could do with a cross reference repository:</p>
<ul>
<li>search for a variable, macro, function name etc and find the places in kernel where it&#8217;s defined and used (<strong>Identifier search</strong>)</li>
<li>search for a particular file name (<strong>file search</strong>)</li>
</ul>
<p>and many more, depending of your current repository.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briefbox.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briefbox.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briefbox.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briefbox.wordpress.com&amp;blog=5012668&amp;post=19&amp;subd=briefbox&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://briefbox.wordpress.com/2008/09/30/corss-referencing-linux-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6d69f5489728fb6729f7e87faf9af63f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">briefbox</media:title>
		</media:content>
	</item>
	</channel>
</rss>
