<?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; shefalisngl92</title>
	<atom:link href="https://www.emblogic.com/blog/author/shefalisngl92/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>Character driver upto write in multiple qsets</title>
		<link>https://www.emblogic.com/blog/06/character-driver-upto-write-in-multiple-qsets/</link>
		<comments>https://www.emblogic.com/blog/06/character-driver-upto-write-in-multiple-qsets/#comments</comments>
		<pubDate>Sun, 29 Jun 2014 09:30:26 +0000</pubDate>
		<dc:creator><![CDATA[shefalisngl92]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=10714</guid>
		<description><![CDATA[1 2 RCS file: newwrite.c,v 3 Working file: newwrite.c 4 head: 1.1 5 branch: 6 locks: strict 7 emblogic1: 1.1 8 access list: 9 symbolic names: 10 keyword substitution: kv 11 total revisions: 1; selected revisions: 1 12 description: 13 &#8230; <a href="https://www.emblogic.com/blog/06/character-driver-upto-write-in-multiple-qsets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>  1<br />
  2 RCS file: newwrite.c,v<br />
  3 Working file: newwrite.c<br />
  4 head: 1.1<br />
  5 branch:<br />
  6 locks: strict<br />
  7     emblogic1: 1.1<br />
  8 access list:<br />
  9 symbolic names:<br />
 10 keyword substitution: kv<br />
 11 total revisions: 1; selected revisions: 1<br />
 12 description:<br />
 13 write in multiple qsets successfully.<br />
 14 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 15 revision 1.1    locked by: emblogic1;<br />
 16 date: 2014/06/29 09:24:43;  author: emblogic1;  state: Exp;<br />
 17 Initial revision<br />
 18 =============================================================================<br />
~                                                            </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/character-driver-upto-write-in-multiple-qsets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IMPLEMENTATION OF IPC WITH SOCKETS</title>
		<link>https://www.emblogic.com/blog/06/implementation-of-ipc-with-sockets/</link>
		<comments>https://www.emblogic.com/blog/06/implementation-of-ipc-with-sockets/#comments</comments>
		<pubDate>Mon, 16 Jun 2014 13:29:47 +0000</pubDate>
		<dc:creator><![CDATA[shefalisngl92]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=10507</guid>
		<description><![CDATA[RCS file: server.c,v Working file: server.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: successfully implemented socket programming. this is server,in which we create two sockets. one &#8230; <a href="https://www.emblogic.com/blog/06/implementation-of-ipc-with-sockets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
successfully implemented socket programming.<br />
this is server,in which we create two sockets.<br />
one for requesting client and other for processing client.<br />
socket domain we are using is AF_INET.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/06/16 13:07:28;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
this is requesting client.<br />
connect call is used in this to connect with server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/06/16 13:12:57;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: proc1.c,v<br />
Working file: proc1.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	client1: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
this is processing client.<br />
connect call is used to connect with server with different port numberr.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: client1;<br />
date: 2014/06/16 13:17:20;  author: client1;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/implementation-of-ipc-with-sockets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC SEMAPHORES:</title>
		<link>https://www.emblogic.com/blog/03/ipc-semaphores/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-semaphores/#comments</comments>
		<pubDate>Wed, 26 Mar 2014 08:27:55 +0000</pubDate>
		<dc:creator><![CDATA[shefalisngl92]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9497</guid>
		<description><![CDATA[Semaphores let processes query or alter status information. They are often used to monitor and control the availability of system resources such as shared memory segments. semaphore set must be initialized using semget(); the semaphore creator can change its ownership &#8230; <a href="https://www.emblogic.com/blog/03/ipc-semaphores/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Semaphores let processes query or alter status information. They are often used to monitor and control the availability of system resources such as shared memory segments. semaphore set must be initialized using <tt>semget()</tt>; the semaphore creator can change its ownership or permissions using <tt>semctl()</tt>; and semaphore operations are performed via the <tt>semop()</tt> function. These are now discussed below:</p>
<p>INTIALISING A SEMAPHORE:</p>
<p>The function <tt>semget()</tt> initializes or gains access to a semaphore. It is prototyped by:</p>
<pre>int semget(key_t key, int nsems, int semflg);</pre>
<p>When the call succeeds, it returns the semaphore ID (<tt>semid</tt>).</p>
<p>The <tt>key</tt> argument is a access value associated with the semaphore ID.</p>
<p>The <tt>nsems</tt> argument specifies the number of elements in a semaphore array. The call fails when <tt>nsems</tt> is greater than the number of elements in an existing array; when the correct count is not known, supplying 0 for this argument ensures that it will succeed.</p>
<p>The <tt> semflg</tt> argument specifies the initial access permissions and creation control flags.</p>
<p>CONTROLLING A SEMAPHORE:</p>
<p><tt>semctl()</tt> changes permissions and other characteristics of a semaphore set. It is prototyped as follows:</p>
<pre>int semctl(int semid, int semnum, int cmd, union semun arg);</pre>
<p>It must be called with a valid semaphore ID, <tt>semid</tt>. The <tt>semnum</tt> value selects a semaphore within an array by its index.The fourth argument <tt>union semun arg</tt> is optional, depending upon the operation requested.</p>
<p>SEMAPHORE OPERATION:</p>
<p><tt>semop()</tt> performs operations on a semaphore set. It is prototyped by:</p>
<pre>int semop(int semid, struct sembuf *sops, size_t nsops);</pre>
<p>The <tt>semid</tt> argument is the semaphore ID returned by a previous <tt>semget()</tt> call. The <tt>sops</tt> argument is a pointer to an array of structures, each containing the following information about a semaphore operation:</p>
<ul>
<li>The semaphore number</li>
<li>The operation to be performed</li>
<li>Control flags, if any.</li>
</ul>
<p>The <tt>sembuf</tt> structure specifies a semaphore operation, as defined in &lt;<tt>sys/sem.h</tt>&gt;.</p>
<pre>struct sembuf {
        ushort_t        sem_num;        /* semaphore number */
        short           sem_op;         /* semaphore operation */
        short           sem_flg;        /* operation flags */
};</pre>
<p>The <tt>nsops</tt> argument specifies the length of the array, the maximum size of which is determined by the <tt>SEMOPM</tt> configuration option; this is the maximum number of operations allowed by a single semop() call, and is set to 10 by default. The operation to be performed is determined as follows:</p>
<ul>
<li>A positive integer increments the semaphore value by that amount.</li>
<li>A negative integer decrements the semaphore value by that amount. An attempt to set a semaphore to a value less than zero fails or blocks, depending on whether <tt>IPC_NOWAIT</tt> is in effect.</li>
<li>A value of zero means to wait for the semaphore value to reach zero.</li>
</ul>
<p>There are two control flags that can be used with <tt>semop()</tt>:</p>
<dl>
<dt><strong><tt>IPC_NOWAIT</tt></strong></dt>
<dd>&#8211; Can be set for any operations in the array. Makes the function return without changing any semaphore value if any operation for which <tt>IPC_NOWAIT</tt> is set cannot be performed. The function fails if it tries to decrement a semaphore more than its current value, or tests a nonzero semaphore to be equal to zero.</dd>
<dt><strong><tt>SEM_UNDO</tt></strong></dt>
<dd>&#8211; Allows individual operations in the array to be undone when the process exits.</dd>
</dl>
<p>This function takes a pointer, <tt>sops</tt>, to an array of semaphore operation structures. Each structure in the array contains data about an operation to perform on a semaphore. Any process with read permission can test whether a semaphore has a zero value. To increment or decrement a semaphore requires write permission. When an operation fails, none of the semaphores is altered.</p>
<p>The process blocks (unless the <tt>IPC_NOWAIT</tt> flag is set), and remains blocked until:</p>
<ul>
<li>the semaphore operations can all finish, so the call succeeds,</li>
<li>the process receives a signal, or</li>
<li>the semaphore set is removed.</li>
</ul>
<p>Only one process at a time can update a semaphore. Simultaneous requests by different processes are performed in an arbitrary order. When an array of operations is given by a <tt>semop()</tt> call, no updates are done until all operations on the array can finish successfully.</p>
<p>If a process with exclusive use of a semaphore terminates abnormally and fails to undo the operation or free the semaphore, the semaphore stays locked in memory in the state the process left it. To prevent this, the <tt>SEM_UNDO</tt> control flag makes <tt>semop()</tt> allocate an undo structure for each semaphore operation, which contains the operation that returns the semaphore to its previous state. If the process dies, the system applies the operations in the undo structures. This prevents an aborted process from leaving a semaphore set in an inconsistent state. If processes share access to a resource controlled by a semaphore, operations on the semaphore should not be made with <tt>SEM_UNDO</tt> in effect. If the process that currently has control of the resource terminates abnormally, the resource is presumed to be inconsistent. Another process must be able to recognize this to restore the resource to a consistent state. When performing a semaphore operation with <tt>SEM_UNDO</tt> in effect, you must also have it in effect for the call that will perform the reversing operation. When the process runs normally, the reversing operation updates the undo structure with a complementary value. This ensures that, unless the process is aborted, the values applied to the undo structure are cancel to zero. When the undo structure reaches zero, it is removed.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-semaphores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Functions</title>
		<link>https://www.emblogic.com/blog/02/functions-2/</link>
		<comments>https://www.emblogic.com/blog/02/functions-2/#comments</comments>
		<pubDate>Mon, 24 Feb 2014 05:44:57 +0000</pubDate>
		<dc:creator><![CDATA[shefalisngl92]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8583</guid>
		<description><![CDATA[DEFINATION&#8212;A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), We can divide up your code into separate functions. How you divide up your code among different &#8230; <a href="https://www.emblogic.com/blog/02/functions-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left">DEFINATION&#8212;A function is a group of statements that together perform a task. Every C program has at least one function, which is <strong>main()</strong>,</p>
<p>We can divide up your code into separate functions. How you divide up your code among different functions is up to you, but logically the division usually is so each function performs a specific task.</p>
<p>A function <strong>declaration</strong> tells the compiler about a function&#8217;s name, return type, and parameters. A function <strong>definition</strong>provides the actual</p>
<h2>Defining a Function:</h2>
<p>The general form of a function definition in C programming language is as follows:</p>
<pre>return_type function_name( parameter list )
{
   body of the function
}</pre>
<p>body of the function.</p>
<p>A function definition in C programming language consists of a <em>function header</em> and a <em>function body</em>. Here are all the parts of a function:</p>
<ul>
<li><strong>Return Type</strong>: A function may return a value. The <strong>return_type</strong> is the data type of the value the function returns. Some functions perform the desired operations without returning a value. In this case, the return_type is the keyword <strong>void</strong>.</li>
<li><strong>Function Name:</strong> This is the actual name of the function. The function name and the parameter list together constitute the function signature.</li>
<li><strong>Parameters:</strong> A parameter is like a placeholder. When a function is invoked, you pass a value to the parameter. This value is referred to as actual parameter or argument. The parameter list refers to the type, order, and number of the parameters of a function. Parameters are optional; that is, a function may contain no parameters.</li>
<li><strong>Function Body:</strong>The function body contains a collection of statements that define what the function does.<br />
<h2>Function Declarations:</h2>
<p>A function <strong>declaration</strong> tells the compiler about a function name and how to call the function. The actual body of the function can be defined separately.</p>
<p>A function declaration has the following parts:</p>
<pre>return_type function_name( parameter list );</pre>
<h2>Calling a Function:</h2>
<p>While creating a C function, you give a definition of what the function has to do. To use a function, you will have to call that function to perform the defined task.</p>
<p>When a program calls a function, program control is transferred to the called function. A called function performs defined task and when its return statement is executed or when its function-ending closing brace is reached, it returns program control back to the main program.</p>
<pre>To call a function, you simply need to pass the required parameters along with function name, and if function returns a value, then you can store returned value</pre>
</li>
</ul>
<h2>Function Arguments:</h2>
<p>If a function is to use arguments, it must declare variables that accept the values of the arguments. These variables are called the <strong>formal parameters</strong> of the function.</p>
<p>The formal parameters behave like other local variables inside the function and are created upon entry into the function and destroyed upon exit.</p>
<p>While calling a function, there are three ways that arguments can be passed to a function:</p>
<p>1.call by value</p>
<p>2.call by reference</p>
<p>3.call by pointers.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/functions-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Master array implementation project01</title>
		<link>https://www.emblogic.com/blog/02/master-array-implementation-project01/</link>
		<comments>https://www.emblogic.com/blog/02/master-array-implementation-project01/#comments</comments>
		<pubDate>Sat, 08 Feb 2014 09:05:18 +0000</pubDate>
		<dc:creator><![CDATA[shefalisngl92]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8259</guid>
		<description><![CDATA[RCS file: mcdc.c,v Working file: mcdc.c head: 1.1 branch: locks: strict Emblinux: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description:]]></description>
				<content:encoded><![CDATA[<p>RCS file: mcdc.c,v<br />
Working file: mcdc.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
Emblinux: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/master-array-implementation-project01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
