Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6400

What is the "current" in Linux kernel source?

$
0
0

I'm studying about Linux kernel and I have a problem.

I see many Linux kernel source files have current->files. So what is the current?

struct file *fget(unsigned int fd){     struct file *file;     struct files_struct *files = current->files;     rcu_read_lock();     file = fcheck_files(files, fd);     if (file) {             /* File object ref couldn't be taken */             if (file->f_mode & FMODE_PATH ||                 !atomic_long_inc_not_zero(&file->f_count))                     file = NULL;     }     rcu_read_unlock();     return file; }

Viewing all articles
Browse latest Browse all 6400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>