Re: use of EXPORT_SYMBOL()

2013-01-29 Thread Adel Qodmani
On Tue, Jan 29, 2013 at 9:52 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: On Tue, Jan 29, 2013 at 3:13 AM, horseriver horseriv...@gmail.com wrote: hi:) In kernel code ,what is the use of EXPORT_SYMBOL()? Does it export a function to user application , so this function

Re: method to get backtrace of kernel function?

2013-01-29 Thread Kristof Provost
On 2013-01-29 14:21:24 (+0700), Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Can this function be used in user application? no. But I guess I see quite similar function provided by glibc/gcc. Forgot the function name though, sorry... backtrace()

Re: thread concurrent file operation

2013-01-29 Thread Valdis . Kletnieks
On Tue, 29 Jan 2013 16:56:02 +0100, Tobias Boege said: Look some lines above: struct fd f = fdget(fd); That creates a reference, not a lock. It basically assures that the system doesn't reap and reclaim that fd out from under the code. (In other words, it's managing lifetime, not

Re: thread concurrent file operation

2013-01-29 Thread Karaoui mohamed lamine
2013/1/29 Tobias Boege tob...@gambas-buch.de On Tue, 29 Jan 2013, Karaoui mohamed lamine wrote: Hello, I was looking at how a syscall read/write was done, and i found this : loff_t pos = file_pos_read(f.file); ret = vfs_read(f.file, buf, count, pos);

Re: thread concurrent file operation

2013-01-29 Thread Valdis . Kletnieks
On Tue, 29 Jan 2013 18:25:19 +0100, Karaoui mohamed lamine said: This function is supposed to return the file reference, does do the locking? Refcounting only, no locking provided by fdget. It seems that i can't find the lock instruction( with all those rcu instructions, i am little lost),

Re: guides to board files - device-tree and Android - mainline?

2013-01-29 Thread Paul Wise
On Tue, 2013-01-29 at 15:51 +0100, Thomas Petazzoni wrote: No, there is no automated tool, because it is not possible to do that automatically. The device drivers used by your board must have a Device Tree binding, and writing the Device Tree source cannot directly be done from the C board

Re: Where does kernel store per task file position?

2013-01-29 Thread Rajat Sharma
I'm still not able to figure out where exactly is the position of file stored per task_struct. struct file * itself is per process (task_struct) so file-f_pos is file position per process, if thats what you are looking for. I hope you haven't assumed that struct file itself is unique for a file,

RE: Where does kernel store per task file position?

2013-01-29 Thread Pranay Kumar Srivastava
-Original Message- From: Rajat Sharma [mailto:fs.ra...@gmail.com] Sent: Wednesday, January 30, 2013 11:16 AM To: Pranay Kumar Srivastava Cc: kernelnewbies@kernelnewbies.org Subject: Re: Where does kernel store per task file position? I'm still not able to figure out where

Re: Where does kernel store per task file position?

2013-01-29 Thread Rajat Sharma
Correct :) On Wed, Jan 30, 2013 at 12:01 PM, Pranay Kumar Srivastava pranay.shrivast...@hcl.com wrote: -Original Message- From: Rajat Sharma [mailto:fs.ra...@gmail.com] Sent: Wednesday, January 30, 2013 11:16 AM To: Pranay Kumar Srivastava Cc: