device/request.h header reference
[Devices support library module]

The source code of this header can be browsed online.

Description  

Generic device request

Members  

Types  

Functions  

Macro  

Members detail  

#define DEV_REQUEST_DELAYED_FUNC(n)  

This macro is declared in device/request.h source file, line 354.

See also dev_request_delay_func_t.

#define DEV_REQUEST_INHERIT(class_)  

This macro is declared in device/request.h source file, line 200.

#define DEV_REQUEST_PQUEUE_OPS(class_)  

This macro is declared in device/request.h source file, line 148.

#define DEV_REQUEST_QUEUE_OPS(class_)  

This macro is declared in device/request.h source file, line 97.

#define DEV_REQUEST_WAIT_FUNC(class_)  

This macro is declared in device/request.h source file, line 317.

#define GCT_CONTAINER_ALGO_dev_request_pqueue  

This macro is declared in device/request.h source file, line 57.

#define GCT_CONTAINER_ALGO_dev_request_queue  

This macro is declared in device/request.h source file, line 52.

#define __DEVICE_REQUEST_H__  

This macro is declared in device/request.h source file, line 29.

void dev_request_delayed_cleanup(struct dev_request_dlqueue_s *q)  

This function is declared in device/request.h source file, line 403.

This function cleanups a delayed device request queue.

void dev_request_delayed_end(struct dev_request_dlqueue_s *q, struct dev_request_s *rq)  

This function is declared in device/request.h source file, line 416.

This function removes the request from the queue, schedules execution of the next request and executes the completion kroutine of the request. This must be called from the dev_request_delayed_func_t processing function of the driver.

typedef void (dev_request_delayed_func_t)(const struct device_accessor_s *accessor, struct dev_request_s *rq_)   

This typedef is declared in device/request.h source file, line 360.

This typedef is the device request processing function which is called with interrupts enabled.

This declaration involves expansion of the DEV_REQUEST_DELAYED_FUNC macro.

See also struct dev_request_dlqueue_s.

void dev_request_delayed_init(struct dev_request_dlqueue_s *q, dev_request_delayed_func_t *f)  

This function is declared in device/request.h source file, line 392.

This function initializes a delayed device request queue.

bool_t dev_request_delayed_isidle(struct dev_request_dlqueue_s *q)  

This function is declared in device/request.h source file, line 436.

This function tests if a delayed device request queue is idle.

void dev_request_delayed_push(const struct device_accessor_s *accessor, struct dev_request_dlqueue_s *q, struct dev_request_s *rq, bool_t critical)  

This function is declared in device/request.h source file, line 464.

This function pushes the device request in a struct dev_request_dlqueue_s delayed execution queue. if interrupts are enabled and either the critical parameter is not set or the queue is empty, the processing function is called immediately. In other cases, the call is delayed for execution from an interruptible context.

When the critical parameter is set, requests are not handled in parallel. This means that the next call to the dev_request_delayed_func_t processing function will not occur before the call to the dev_request_delayed_end function for the current request.

When the CONFIG_DEVICE_DELAYED_REQUEST token is not defined, no queue is used and critical calls will make processing run with interrupts disabled.

struct dev_request_dlqueue_s  

This struct is declared in device/request.h source file, line 375.

Delayed device request queue. May be used in device drivers where requests involve a large amount of computation which can be executed with interrupts enabled.

When the CONFIG_DEVICE_DELAYED_REQUEST configuration token is defined, the requests which are queued when interrupts are disabled will be processed later in an other context.

In the other case, the execution of the function takes place immediately. If this is not on option, the driver must enforce definition of the configuration token.

void dev_request_poll_init(struct dev_request_s *rq, const struct semaphore_poll_s *give)  

This function is declared in device/request.h source file, line 350.

This function setups a device request for use in a semaphore poll construct. The kr and pvdata fields of the request are initialized.

This is available when CONFIG_MUTEK_SEMAPHORE is defined.

Preprocessor condition: defined( CONFIG_MUTEK_SEMAPHORE )

See also semaphore_poll_init.

typedef void * dev_request_pqueue_entry_t  

This typedef is declared in device/request.h source file, line 141.

typedef struct dev_request_s * dev_request_pqueue_item_t  

This typedef is declared in device/request.h source file, line 141.

typedef void * dev_request_pqueue_root_t  

This typedef is declared in device/request.h source file, line 141.

typedef void * dev_request_queue_entry_t  

This typedef is declared in device/request.h source file, line 90.

typedef struct dev_request_s * dev_request_queue_item_t  

This typedef is declared in device/request.h source file, line 90.

typedef void * dev_request_queue_root_t  

This typedef is declared in device/request.h source file, line 90.

struct dev_request_s  

This struct is declared in device/request.h source file, line 62.

Device request base

FieldDescription
union <anonymous> {
struct kroutine_s kr;
error_t error;
};
union <anonymous> {
uintptr_t pushed;
};
union <anonymous> {Caller private data
void * pvdata;
uintptr_t pvuint;
};
union <anonymous> {Driver private data
void * drvdata;
uintptr_t drvuint;
};

See also dev_request_queue_item_t and dev_request_pqueue_item_t.

struct dev_request_s * dev_request_s_from_kr(void *x)  

void dev_request_sched_done(struct kroutine_s *kr, enum kroutine_exec_flags_e flags)  

This function is declared in device/request.h source file, line 274.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

This declaration involves expansion of the KROUTINE_EXEC macro.

void dev_request_sched_init(struct dev_request_s *rq, struct dev_request_status_s *status)  

This function is declared in device/request.h source file, line 288.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

void dev_request_sched_wait(struct dev_request_status_s *status)  

This function is declared in device/request.h source file, line 299.

Preprocessor condition: defined( CONFIG_MUTEK_CONTEXT_SCHED )

struct dev_request_status_s  

This struct is declared in device/request.h source file, line 264.

FieldDescription
lock_t lock;
struct sched_context_s * ctx;
bool_t done;

void dev_request_delayed_kr(struct kroutine_s *kr, enum kroutine_exec_flags_e flags)  

This function is for internal use only.

void dev_request_sem_done(struct kroutine_s *kr, enum kroutine_exec_flags_e flags)  

This function is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:38 2018 using MkDoc