nfs-ganesha 1.4
Defines | Functions

9p_dispatcher.c File Reference

The file that contain the '_9p_dispatcher_thread' routine for ganesha. More...

#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <fcntl.h>
#include <sys/file.h>
#include <sys/select.h>
#include <poll.h>
#include "HashData.h"
#include "HashTable.h"
#include "log.h"
#include "abstract_mem.h"
#include "nfs_init.h"
#include "nfs_core.h"
#include "cache_inode.h"
#include "nfs_exports.h"
#include "nfs_creds.h"
#include "nfs_proto_functions.h"
#include "nfs_dupreq.h"
#include "nfs_file_handle.h"
#include "nfs_stat.h"
#include "SemN.h"
#include "9p.h"

Go to the source code of this file.

Defines

#define P_FAMILY   AF_INET

Functions

void DispatchWork9P (request_data_t *preq, unsigned int worker_index)
void * _9p_socket_thread (void *Arg)
int _9p_create_socket (void)
void _9p_dispatcher_svc_run (long int sock)
void * _9p_dispatcher_thread (void *Arg)

Detailed Description

The file that contain the '_9p_dispatcher_thread' routine for ganesha.

Date:
Date:
2006/02/23 12:33:05

9p_dispatcher.c : The file that contain the '_9p_dispatcher_thread' routine for ganesha (and all the related stuff).

Definition in file 9p_dispatcher.c.


Define Documentation

#define P_FAMILY   AF_INET

Definition at line 67 of file 9p_dispatcher.c.


Function Documentation

int _9p_create_socket ( void  )

_9p_create_socket: create the accept socket for 9P

This function create the accept socket for the 9p dispatcher thread.

Parameters:
(none)
Returns:
socket fd or -1 if failed.

Definition at line 290 of file 9p_dispatcher.c.

void _9p_dispatcher_svc_run ( long int  sock)

_9p_dispatcher_svc_run: main loop for 9p dispatcher

This function is the main loop for the 9p dispatcher. It never returns because it is an infinite loop.

Parameters:
sockaccept socket for 9p dispatch
Returns:
nothing (void function).

Definition at line 393 of file 9p_dispatcher.c.

void* _9p_dispatcher_thread ( void *  Arg)

_9p_dispatcher_thread: thread used for RPC dispatching.

Thead used for RPC dispatching. It gets the requests and then spool it to one of the worker's LRU. The worker chosen is the one with the smaller load (its LRU is the shorter one).

Parameters:
Arg(unused)
Returns:
Pointer to the result (but this function will mostly loop forever).

Definition at line 448 of file 9p_dispatcher.c.

void* _9p_socket_thread ( void *  Arg)

_9p_socket_thread: 9p socket manager.

This function is the main loop for the 9p socket manager. One such thread exists per connection.

Parameters:
Argthe socket number cast as a void * in pthread_create
Returns:
NULL

Definition at line 110 of file 9p_dispatcher.c.

void DispatchWork9P ( request_data_t preq,
unsigned int  worker_index 
)

Definition at line 72 of file 9p_dispatcher.c.