nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions

파일 제어 관련 함수들을 선언/정의 한다. More...

Collaboration diagram for File 제어 옵션:

Macros

#define F_DUPFD   0 /* Duplicate file descriptor. */
 
#define F_GETFD   1 /* Get file descriptor flags. */
 
#define F_GETFL   3 /* Get file status flags. */
 
#define F_GETLK   5 /* Get record locking info. */
 
#define F_GETOWN   9 /* Set owner (process receiving SIGIO). */
 
#define F_SETFD   2 /* Set file descriptor flags. */
 
#define F_SETFL   4 /* Set file status flags. */
 
#define F_SETLK   6 /* Set record locking info (non-blocking). */
 
#define F_SETLKW   7 /* Set record locking info (blocking). */
 
#define F_SETOWN   8 /* Get owner (process receiving SIGIO). */
 
#define O_ACCMODE   0003
 
#define O_APPEND   02000
 
#define O_ASYNC   020000
 
#define O_CREAT   0100 /* not fcntl */
 
#define O_EXCL   0200 /* not fcntl */
 
#define O_FSYNC   O_SYNC
 
#define O_NDELAY   O_NONBLOCK
 
#define O_NOCTTY   0400 /* not fcntl */
 
#define O_NONBLOCK   04000
 
#define O_RDONLY   00
 
#define O_RDWR   02
 
#define O_SYNC   04010000
 
#define O_TRUNC   01000 /* not fcntl */
 
#define O_WRONLY   01
 

Functions

int creat (const char *path, mode_t mode)
 
int fcntl (int fd, int cmd,...)
 
int open (const char *path, int mode,...)
 
int openat (int fd, const char *path, int mode,...)
 
int posix_fadvise (int fd, off_t offset, off_t len, int advice)
 
int posix_fallocate (int fd, off_t offset, off_t len)
 

Detailed Description

파일 제어 관련 함수들을 선언/정의 한다.

Date
2011-8-27
Author
Sung-jae Park nices.nosp@m.j@ni.nosp@m.cesj..nosp@m.com

Macro Definition Documentation

#define F_DUPFD   0 /* Duplicate file descriptor. */

Definition at line 26 of file fcntl.h.

#define F_GETFD   1 /* Get file descriptor flags. */

Definition at line 27 of file fcntl.h.

#define F_GETFL   3 /* Get file status flags. */

Definition at line 29 of file fcntl.h.

#define F_GETLK   5 /* Get record locking info. */

Definition at line 31 of file fcntl.h.

#define F_GETOWN   9 /* Set owner (process receiving SIGIO). */

Definition at line 35 of file fcntl.h.

#define F_SETFD   2 /* Set file descriptor flags. */

Definition at line 28 of file fcntl.h.

#define F_SETFL   4 /* Set file status flags. */

Definition at line 30 of file fcntl.h.

#define F_SETLK   6 /* Set record locking info (non-blocking). */

Definition at line 32 of file fcntl.h.

#define F_SETLKW   7 /* Set record locking info (blocking). */

Definition at line 33 of file fcntl.h.

#define F_SETOWN   8 /* Get owner (process receiving SIGIO). */

Definition at line 34 of file fcntl.h.

#define O_ACCMODE   0003

Definition at line 11 of file fcntl.h.

#define O_APPEND   02000

Definition at line 19 of file fcntl.h.

#define O_ASYNC   020000

Definition at line 24 of file fcntl.h.

#define O_CREAT   0100 /* not fcntl */

Definition at line 15 of file fcntl.h.

#define O_EXCL   0200 /* not fcntl */

Definition at line 16 of file fcntl.h.

#define O_FSYNC   O_SYNC

Definition at line 23 of file fcntl.h.

#define O_NDELAY   O_NONBLOCK

Definition at line 21 of file fcntl.h.

#define O_NOCTTY   0400 /* not fcntl */

Definition at line 17 of file fcntl.h.

#define O_NONBLOCK   04000

Definition at line 20 of file fcntl.h.

#define O_RDONLY   00

Definition at line 12 of file fcntl.h.

#define O_RDWR   02

Definition at line 14 of file fcntl.h.

Referenced by create_fat_cache().

#define O_SYNC   04010000

Definition at line 22 of file fcntl.h.

#define O_TRUNC   01000 /* not fcntl */

Definition at line 18 of file fcntl.h.

#define O_WRONLY   01

Definition at line 13 of file fcntl.h.

Function Documentation

int creat ( const char *  path,
mode_t  mode 
)
Parameters
[in]path
[in]mode
Returns
int

Definition at line 6 of file fcntl.c.

References ENOSYS.

int fcntl ( int  fd,
int  cmd,
  ... 
)
Parameters
[in]fd
[in]cmd
[in]...
Returns
int

Definition at line 11 of file fcntl.c.

References ENOSYS.

int open ( const char *  path,
int  mode,
  ... 
)
Parameters
[in]path
[in]mode
[in]...
Returns
int

Definition at line 22 of file open.c.

References BUFSIZ, file::ctx, EFAULT, ENOSPC, thread::file_ctx, MAX_ENTRY, file_object_info::mode, file::object, object_create(), file_object_info::path, printf(), pthread_self(), file_object_info::size, and thread_file_ctx::table.

Referenced by create_fat_cache().

Here is the call graph for this function:

Here is the caller graph for this function:

int openat ( int  fd,
const char *  path,
int  mode,
  ... 
)
Parameters
[in]fd
[in]path
[in]mode
[in]...
Returns
int

Definition at line 16 of file fcntl.c.

References ENOSYS.

int posix_fadvise ( int  fd,
off_t  offset,
off_t  len,
int  advice 
)
Parameters
[in]fd
[in]offset
[in]len
[in]advice
Returns
int

Definition at line 21 of file fcntl.c.

References ENOSYS.

int posix_fallocate ( int  fd,
off_t  offset,
off_t  len 
)
Parameters
[in]fd
[in]offset
[in]len
Returns
int

Definition at line 26 of file fcntl.c.

References ENOSYS.