Semaphores are a programming construct designed by E. W. Dijkstra in the late 1960s. Dijkstra’s model was the operation of railroads: consider a stretch of railroad in which there is a single track over which only one train at a … Continue reading
The sigaction system call is used to change the action taken by process on receipt of a specific signal….It is used in program as: sigaction(int,struct sigaction *new,struct sigaction *old); Various macros used for sigaction are: sigismember sigaddset sigdelset sigemptyset sigfillset … Continue reading
In computing, a device driver (commonly referred to as simply a driver) is a computer program that operates or controls a particular type of device that is attached to a computer.[1] A driver provides a software interface to hardware devices, … Continue reading
Character Device Driver: In order to create a link between your device means your hardware either it is internal or externally attached and user application we need a set of rules which will define how your concerned device shall deal … Continue reading
RCS file: req.c,v Working file: req.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: this is the requesting program in which i am adding two value. the value sent … Continue reading
RCS file: cleanup.c,v Working file: cleanup.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: unregister_chrdev to unregister the device free the memory that is allocated to device … Continue reading
RCS file: write.c,v 3 Working file: write.c 4 head: 1.1 5 branch: 6 locks: strict 7 root: 1.1 8 access list: 9 symbolic names: 10 keyword substitution: kv 11 total revisions: 1; selected revisions: 1 12 description: 13 decllared write … Continue reading
head 1.32; access; symbols; locks; strict; comment 1.32 date 2014.05.06.06.20.21; author root; state Exp; branches; next 1.31; 1.31 date 2014.05.04.09.46.22; author root; state Exp; branches; next 1.30; 1.30 date 2014.05.04.08.15.17; author root; state Exp; branches; next 1.29; 1.29 date 2014.05.04.06.32.30; … Continue reading
RCS file: init.c,v Working file: init.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: driver is inserted and registered in kernel space. driver is initialized and add … Continue reading
Definition: A FIFO is similar to a pipe. A FIFO (First In First Out) is a one-way flow of data. FIFOs have a name, so unrelated processes can share the FIFO. FIFO is a named pipe. This is the main … Continue reading
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { char *pwd=NULL; char *pwd1=NULL; int ch=0,i=0,ret,len; char *buff; pwd=malloc(sizeof(char) *10); pwd1=malloc(sizeof(char) *10); buff=malloc(sizeof(char) *10); FILE *fptr = NULL; fptr=fopen(“hello.txt”,”r+”); if(fptr == NULL) { perror(“fopen”); return -1; } else printf(“file is opened … Continue reading
C runtime errors are those errors that occur during the execution of a c program and generally occur due to some illegal operation performed in the program. Examples of some illegal operations that may produce runtime errors are: Dividing a … Continue reading
#include<stdio.h> #include<stdlib.h> int main() { char *pwd=NULL; char *buff=NULL; pwd=(char *)malloc(sizeof(char)*10); buff=(char *)malloc(sizeof(char)*10); int i=0,j,ret=0; int ch; FILE *fptr=NULL; printf(“enter the password”); scanf(“%s”,pwd); fptr=fopen(“file.txt”,”r”); if(fptr<0) { perror(“fopen”); return(-1); } ch=fgetc(fptr); for(j=0;j<3;j++) { while(ch!=EOF) { if(ch!=’\n’) { buff[i] = ch; i++; … Continue reading
RCS file: fun_3.c,v Working file: fun_3.c head: branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 0 description: Program to concatenate two strings without strcat =============================================================================
memset- use for fill the date into any type of pointer see aguments of memset: memset(void *,int c,size_t n); return type of memset – memset return pointer of same type of data which fill with memset.