#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
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
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
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
#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
Implemented Driver Initialization Algo. Able to run my own open() function in module.
implemented sculls successfully at the application level……it took some time but was worth it
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
whenever i execute server every time i need to change the port no. if i don’t change its sayin “bind: address in use”..?????
I could scuccesfully implement read & write for a single item
Implememted multiple quantums writing and reading successfully.