kernel call problem


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users kernel call problem
# 1  
Old 04-13-2008
kernel call problem

hi all

I want to make a kernel call which takes as input an integer x and prints 2*x

Anyone who knows how could i do that?
# 2  
Old 04-13-2008
Could I ask why you need a kernel call for this? A simple function (or even a macro) will solve this.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Problem with lseek call.

The following code: int fd; if (fd = open("mem", O_RDONLY) == -1) return 1; if (lseek(fd, 0, SEEK_SET) == -1) { char *buf = malloc(512); buf = strerror(errno); printf("%s\n", buf); return 1; } always returns with "illegal seek"... (2 Replies)
Discussion started by: Sir_Tomasz
2 Replies

2. OS X (Apple)

Applescript application call problem...

Hi all... I am trying to create a shell project purely for this Macbook Pro. I do NOT want to use SOX as the sampling _source_ but Quicktime instead, the idea being that NO third party installs will be needed. The code below works fine except the commented out Applescript line does not do... (2 Replies)
Discussion started by: wisecracker
2 Replies

3. Programming

can a linux kernel module call libc functions?

can a linux kernel module call libc functions, such as printf(), strcpy(), etc...? (9 Replies)
Discussion started by: vistastar
9 Replies

4. Shell Programming and Scripting

awk , function call problem

#!/bin/bash awk ' function ad(t,r){ return (t+r); } BEGIN{ print ad(5,3); } { print ad(5,3); } ' Doesn't print anything for the last print ad(5,3); (6 Replies)
Discussion started by: cola
6 Replies

5. Linux

system call problem

hi, where can I find the detail information about the syscall in binary instructions of linux/mips. for example, in linux/mips: li v0, 4140 syscall it's a syacall of "lseek" , but how can I find that which registers will be used in this syscall , and the meaning of the arguments in the... (2 Replies)
Discussion started by: zerocool_08
2 Replies

6. Shell Programming and Scripting

Recursive function call problem

This is shell script I have made to lists out directory contents and filenames for any given directory (without using ls command). There is some problem in dirfunc function call which I have marked 1 is not working. Can anybody suggest what is the problem there and how should I correct it. ... (2 Replies)
Discussion started by: netresearch
2 Replies

7. UNIX for Advanced & Expert Users

how implement a kernel call?

Hi, I would like o implement a kernel call, but I don't know how to do it. Where can I find an example? I've already look to minix source code, but I'm still confused and not very comfortable to mess with the code at this level. Thanks, (1 Reply)
Discussion started by: pedrosacosta
1 Replies

8. Programming

kernel-kernel call communication

hi all! i have developed a mechanism in system.c to count how many times each kernel call is called. The results are held in an array in system.c . What i want to do is to create a new kernel call which will print this array. I need help in passing the array from system.c to the new kernel call. ... (5 Replies)
Discussion started by: aureliano
5 Replies

9. Programming

Problem in system call

Dear Friends, I write a c program to list the directories recursively. For this I write a function called my_readdir to read the content of directory. For this I use read system call it returns -1, then I use readdir system call it gives comment terminated error or segmentation... (1 Reply)
Discussion started by: spmlingam
1 Replies

10. Linux

Making Socket System Call From Linux Kernel Module?

Hi Everyone! How can we make a socket() system call from a linux module executing in kernel space? If any one knows, kindly tell me. It will be great. I want to use the socket interface in linux kernel space for sending raw packets over the network. Hamayun (0 Replies)
Discussion started by: mian_m_hamayun
0 Replies
Login or Register to Ask a Question