EmbLogic's Blog

Category Archives: Uncategorized

good program on the use of function pointers …everybody go through it will be helpful

#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(“Use int (i) or float (f)? “); scanf(“%c”, &ans); if (ans == … Continue reading →

Posted in Uncategorized | 2 Comments

MEMORY BARRIERS

Memory barriers are instructions to both the compiler and the CPU to impose a partial ordering between the memory access operations specified either side of the barrier. Older and less complex CPUs will perform memory accesses in exactly the order … Continue reading →

Posted in Uncategorized | Leave a comment

output doubt

read the following code: main() { int *p,a[5]={1,2,3,4,5}; for(p=a;p<&a[5];p++) { *p=p-a; printf(“%d “,*p); } return 0; } theoretical output= 0 4 8 12 16 compiler output=0 1 2 3 4 question: Why p++ (increment in address of p) increments the … Continue reading →

Posted in Data Structures with C, Uncategorized | 2 Comments

Optimization in GCC

Levels of Optimization Let’s first look at how GCC categorizes optimizations and how a developer can control which are used and, sometimes more important, which are not. A large variety of optimizations are provided by GCC. Most are categorized into … Continue reading →

Posted in Uncategorized | 2 Comments

LKM

done four steps of initialization function……..

Posted in Uncategorized | Leave a comment

LKM

done four steps of initialization function………

Posted in Uncategorized | Leave a comment

lkm

implemented four steps of initialization function….

Posted in Uncategorized | Leave a comment

usb driver.probe function not call properly ? please provide me appropriate solution?

#include<linux/init.h> #include<linux/module.h> #include<linux/kernel.h> #include<linux/usb.h> #include<linux/fs.h>              //for struct file_operations #include<linux/slab.h>           //for kmalloc #include<linux/kref.h>          //for struct kref #include<linux/mutex.h>        //for struct mutex #include<linux/device.h>      //for structure device #include<linux/completion.h>  //for struct completion #include<linux/interrupt.h> #include<linux/writeback.h> MODULE_LICENSE(“GPL”); MODULE_AUTHOR(“lkm”); static int gdm7213_probe(struct usb_interface *interface, const struct usb_device_id *id); … Continue reading →

Posted in Uncategorized | 1 Comment

Today’s work…

Implemented Driver Initialization Algo. Able to run my own open() function in module.

Posted in Uncategorized | Leave a comment

sculls

implemented sculls successfully at the application level……it took some time but was worth it

Posted in Uncategorized | Leave a comment

problem in void**data field of the struct scull_Qset

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…..help … Continue reading →

Posted in Uncategorized | 2 Comments

device driver

implemented lkm…..

Posted in Uncategorized | Leave a comment

problem in implementing inet

whenever i execute server every time i need to change the port no. if i don’t change its sayin “bind: address in use”..?????  

Posted in Uncategorized | 1 Comment

character driver status

I could scuccesfully implement read & write for a single item

Posted in Uncategorized | Leave a comment

Char Driver

Implememted multiple quantums writing and reading successfully.

Posted in Uncategorized | Leave a comment