phunix/common/include/minix/driver_mt.h
David van Moolenbroek e1d867b686 ahci/libdriver: multithreading support
This patch adds support for executing multiple concurrent requests on
different devices on the same AHCI controller. The libdriver library
has been extended to include a generic multithreading interface, and
the AHCI driver has been extended to make use of this interface.

The original version of this code has been written by Arne Welzel.
2011-11-04 09:37:53 +00:00

17 lines
530 B
C

#ifndef _MINIX_DRIVER_MT_H
#define _MINIX_DRIVER_MT_H
#define DRIVER_MT_API 1 /* do not expose the singlethreaded API */
#include <minix/driver.h>
/* The maximum number of worker threads. */
#define DRIVER_MT_MAX_WORKERS 32
_PROTOTYPE( void driver_mt_task, (struct driver *driver_p, int driver_type) );
_PROTOTYPE( void driver_mt_sleep, (void) );
_PROTOTYPE( void driver_mt_wakeup, (thread_id_t id) );
_PROTOTYPE( void driver_mt_stop, (void) );
_PROTOTYPE( void driver_mt_terminate, (void) );
#endif /* _MINIX_DRIVER_MT_H */