nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
fdc.c File Reference
#include <sys/types.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <stropts.h>
#include <stdarg.h>
#include <time.h>
#include <errno.h>
#include <list.h>
#include <pthread.h>
#include <semaphore.h>
#include <object.h>
#include <vfs.h>
#include <device.h>
#include <dma.h>
#include <fdc.h>
#include <fdc_ctrl.h>
#include <fdc_single.h>
#include <zone.h>
#include <page_frame.h>
#include <onetime_map.h>
#include <debug.h>
#include <util.h>
Include dependency graph for fdc.c:

Go to the source code of this file.

Functions

int fdc_close (struct ninfo *ninfo, struct nctx *ctx)
 
int fdc_init (void)
 
int fdc_ioctl (struct ninfo *ninfo, struct nctx *ctx, int request, va_list va)
 
off_t fdc_lseek (struct ninfo *ninfo, struct nctx *ctx, off_t offset, int whence)
 
int fdc_open (struct ninfo *ninfo, struct nctx *ctx)
 
int fdc_read (struct ninfo *ninfo, struct nctx *ctx, void *buf, size_t size)
 
int fdc_write (struct ninfo *ninfo, struct nctx *ctx, const void *buf, size_t size)
 

Function Documentation

int fdc_close ( struct ninfo ninfo,
struct nctx ctx 
)

Definition at line 279 of file fdc.c.

References fdc_fini_ctrl(), fdc_motor_off(), free(), NULL, nctx::priv, pthread_mutex_lock(), and pthread_mutex_unlock().

Here is the call graph for this function:

int fdc_ioctl ( struct ninfo ninfo,
struct nctx ctx,
int  request,
va_list  va 
)

Definition at line 256 of file fdc.c.

References EINVAL, fdc_version(), I_GETINFO, nctx::priv, pthread_mutex_lock(), pthread_mutex_unlock(), and va_arg.

Here is the call graph for this function:

off_t fdc_lseek ( struct ninfo ninfo,
struct nctx ctx,
off_t  offset,
int  whence 
)

Definition at line 120 of file fdc.c.

References nctx::offset, pthread_mutex_lock(), pthread_mutex_unlock(), SEEK_CUR, SEEK_END, SEEK_SET, and ninfo::size.

Here is the call graph for this function:

int fdc_open ( struct ninfo ninfo,
struct nctx ctx 
)

Definition at line 292 of file fdc.c.

References ninfo_dev::device, ENOMEM, fdc_init_ctrl(), fdc_motor_on(), free(), malloc(), MINOR, nctx::offset, nctx::priv, ninfo::priv, pthread_mutex_lock(), and pthread_mutex_unlock().

Here is the call graph for this function:

int fdc_read ( struct ninfo ninfo,
struct nctx ctx,
void *  buf,
size_t  size 
)
int fdc_write ( struct ninfo ninfo,
struct nctx ctx,
const void *  buf,
size_t  size 
)