<?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/"
	>

<channel>
	<title>EmbLogic &#187; gaurav.sharma</title>
	<atom:link href="https://www.emblogic.com/blog/author/gaurav-sharma/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>lseek doubt</title>
		<link>https://www.emblogic.com/blog/04/lseek-doubt/</link>
		<comments>https://www.emblogic.com/blog/04/lseek-doubt/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 12:44:27 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2515</guid>
		<description><![CDATA[in write and read functions we are provided with a pointer to the file structure namely filp and we know this can change the position of the current read/write position namely the f_pos field in the struct file&#8230;.but when in &#8230; <a href="https://www.emblogic.com/blog/04/lseek-doubt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>in write and read functions we are provided with a pointer to the file structure namely filp and we know this can change the position of the current read/write position namely the f_pos field in the struct file&#8230;.but when in my write function i want to update the current read/write position using the statement filp-&gt;f_pos=nobsw(number of bytes successfully written),then this change is not visible in the f_pos field of the struct file,but when i do the same change using the last argument of the write function which is a pointer to the current read /write position using this statement *offp=nobsw,then the change is visible in the f_pos fileld of the struct file and i am able to read/write from SEEK_CUR and SEEK_END&#8230;why this happens&#8230;.though both *offp(i.e the last argument of the write function in driver and filp-&gt;f_pos point to the same f_pos in the struct file. do they really point to the same f_pos in the struct file,a point to ponder upon&#8230;.pls post if anybody knows why this happens</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/lseek-doubt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>threads</title>
		<link>https://www.emblogic.com/blog/04/threads/</link>
		<comments>https://www.emblogic.com/blog/04/threads/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 19:57:26 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2428</guid>
		<description><![CDATA[what could be a practical example of the usage of the shared global variables in threads&#8230;.is the usage similar to the shared memory???]]></description>
				<content:encoded><![CDATA[<p>what could be a practical example of the usage of the shared global variables in threads&#8230;.is the usage similar to the shared memory???</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/threads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uninterpretable results if I try to print minor number in open function</title>
		<link>https://www.emblogic.com/blog/04/uninterpretable-results-if-i-try-to-print-minor-number-in-open-function/</link>
		<comments>https://www.emblogic.com/blog/04/uninterpretable-results-if-i-try-to-print-minor-number-in-open-function/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 06:43:47 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2419</guid>
		<description><![CDATA[the obvious thought which comes in everybody&#8217;s mind is that when we give major and minor number at the time of mknod ,the device being opened is the one with the given minor number&#8230;.i am also thinking the same&#8230;but discrepancy &#8230; <a href="https://www.emblogic.com/blog/04/uninterpretable-results-if-i-try-to-print-minor-number-in-open-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>the obvious thought which comes in everybody&#8217;s mind is that when we give major and minor number at the time of mknod ,the device being opened is the one with the given minor number&#8230;.i am also thinking the same&#8230;but discrepancy occurs when i print the minor number in the open function&#8230;if i give minor number 2 at the time of mknod then the minor number being printed in the open function is 4 onot 2&#8230;.major number is always printed correctly ie 250 but not the minor number. </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/uninterpretable-results-if-i-try-to-print-minor-number-in-open-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what is the difference between static binding and dynamic binding&#8230;plss explain</title>
		<link>https://www.emblogic.com/blog/04/what-is-the-difference-between-static-binding-and-dynamic-binding-plss-explain/</link>
		<comments>https://www.emblogic.com/blog/04/what-is-the-difference-between-static-binding-and-dynamic-binding-plss-explain/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 22:11:47 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2417</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/what-is-the-difference-between-static-binding-and-dynamic-binding-plss-explain/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>good program on the use of function pointers &#8230;everybody go through it will be helpful</title>
		<link>https://www.emblogic.com/blog/04/good-program-on-the-use-of-function-pointers-everybody-go-through-it-will-be-helpful/</link>
		<comments>https://www.emblogic.com/blog/04/good-program-on-the-use-of-function-pointers-everybody-go-through-it-will-be-helpful/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 14:03:50 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2415</guid>
		<description><![CDATA[#include void use_int(void *); void use_float(void *); void greeting(void (*)(void *), void *); int main(void) { char ans; int i_age = 22; float f_age = 22.0; void *p; printf(&#8220;Use int (i) or float (f)? &#8220;); scanf(&#8220;%c&#8221;, &#38;ans); if (ans == &#8230; <a href="https://www.emblogic.com/blog/04/good-program-on-the-use-of-function-pointers-everybody-go-through-it-will-be-helpful/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include<br />
void use_int(void *);<br />
void use_float(void *);<br />
void greeting(void (*)(void *), void *);</p>
<p>int main(void) {<br />
  char ans;<br />
  int i_age = 22;<br />
  float f_age = 22.0;<br />
  void *p;<br />
  printf(&#8220;Use int (i) or float (f)? &#8220;);<br />
  scanf(&#8220;%c&#8221;, &amp;ans);<br />
  if (ans == &#8216;i&#8217;) {<br />
    p = &amp;i_age;<br />
    greeting(use_int, p);<br />
  }<br />
  else {<br />
    p = &amp;f_age;<br />
    greeting(use_float, p);<br />
  }<br />
  return 0;<br />
}<br />
void greeting(void (*fp)(void *), void *q) {<br />
  fp(q);<br />
}<br />
void use_int(void *r) {<br />
  int a;<br />
  a = * (int *) r;<br />
  printf(&#8220;As an integer, you are %d years old.\n&#8221;, a);<br />
}<br />
void use_float(void *s) {<br />
  float *b;<br />
  b = (float *) s;<br />
  printf(&#8220;As a float, you are %f years old.\n&#8221;, *b);<br />
}</p>
<p>Although this requires us to cast the void pointer into the appropriate type in the relevant subroutine (use_int or use_float), the flexibility here appears in the greeting routine, which can now handle in principle a function with any type of argument. This will especially become apparent when we discuss structures in the next section. </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/good-program-on-the-use-of-function-pointers-everybody-go-through-it-will-be-helpful/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>sculls</title>
		<link>https://www.emblogic.com/blog/04/sculls-2/</link>
		<comments>https://www.emblogic.com/blog/04/sculls-2/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 16:07:04 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2332</guid>
		<description><![CDATA[implemented sculls successfully at the application level&#8230;&#8230;it took some time but was worth it]]></description>
				<content:encoded><![CDATA[<p>implemented sculls successfully at the application level&#8230;&#8230;it took some time but was worth it</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/sculls-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>problem in void**data field of the struct scull_Qset</title>
		<link>https://www.emblogic.com/blog/04/problem-in-voiddata-field-of-the-struct-scull_qset/</link>
		<comments>https://www.emblogic.com/blog/04/problem-in-voiddata-field-of-the-struct-scull_qset/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 11:21:55 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2227</guid>
		<description><![CDATA[i have checked in general that if we take void* data; and then do data=(char*)malloc(sizeof(char)); then it gives no warning but if we take void** data; and then i do data=(char**)malloc(sizeof(char*)); then it gives a warning of incompatible pointer assignment&#8230;..help &#8230; <a href="https://www.emblogic.com/blog/04/problem-in-voiddata-field-of-the-struct-scull_qset/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>i have checked in general that if we take<br />
void* data; and then do data=(char*)malloc(sizeof(char)); then it gives no warning<br />
but if we take void** data; and then i do<br />
data=(char**)malloc(sizeof(char*));<br />
then it gives a warning of incompatible pointer assignment&#8230;..help required here plzz post if anybody knows why</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/problem-in-voiddata-field-of-the-struct-scull_qset/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>sculls</title>
		<link>https://www.emblogic.com/blog/02/sculls/</link>
		<comments>https://www.emblogic.com/blog/02/sculls/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 08:23:58 +0000</pubDate>
		<dc:creator><![CDATA[gaurav.sharma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=1986</guid>
		<description><![CDATA[in sculls do we have to make a linked representation of a queue and then insert elements into that queue by changing the rear pointerie that rear pointer will subsequently point to the location of the node of the linked &#8230; <a href="https://www.emblogic.com/blog/02/sculls/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>in sculls do we have to make a linked representation of a queue and then insert elements into that queue by changing the rear pointerie that rear pointer will subsequently point to the location of the node of the linked list which is represented as a queue and then we will store the characters in that node and move on to the next rear pointer location</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/sculls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
