![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A small minix question | sasa | Shell Programming and Scripting | 2 | 05-21-2007 02:20 PM |
| Minix Installation | deadrobot | UNIX for Dummies Questions & Answers | 2 | 03-26-2004 11:01 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
sys_datacopy in Minix
I'm writing a program that must log all the kernel calls existing in Minix. I recall that Minix is a microkernel OS.
I've a user process that pass a char* that points to a buffer memory to the kernel level. In the kernel level I get all the information, and now, I would like to copy the info to the buffer passed by the user. How can I do that? Since kernel and user process are in different address space, I use the sys_datacopy function that should do it. The problem is that, in the user level, that buffer prints me (null). the function that I use is: sys_datacopy(SELF, (vir_bytes) buf, who, /* <---- I suppose that this in points to the user process number */ (vir_bytes) m_in.m1_p1); m_in is a structure of type message, a structure that Minix uses to pass info from the kernel to the user level and otherwise. m1_p1 is a char* variable. You can find it more info about the structure in ipc.h. Thanks, Pedro |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I think that this problem is the who variable. I'm passing the MM constant. Maybe I must get the process number of my user program.
Thanks, Pedro |
|||
| Google The UNIX and Linux Forums |