/* usb/tasks.h
 *
 * (c) 2002 Simtec Electronics
 *
 * Ben Dooks
 *
 * general task structures - use this in preference to fast or slow specifics
 *
 * $Id: tasks.h,v 1.13 2003/08/06 15:56:11 ben Exp $
 *
 * This Library file is part of the Simtec Electronics USB stack development
 *   suite.
 * Specific licence is granted to use this file by third parties for the
 *   development of USB device drivers.
*/

#ifndef __USB_TASKS_H
#define __USB_TASKS_H "$Id: tasks.h,v 1.13 2003/08/06 15:56:11 ben Exp $"

/* data structrures common to both */

typedef void * task_arg_t;

struct task_resource_s {
  semaphor      *protection;
  unsigned long  resources;
};

struct task_condition_s {
  struct task_resource_s *resources;
  unsigned long mask;
  unsigned long result;
  unsigned long new_resources;
};

/* now choose your task... */

/* note, due to the usb-hub drivers use of the slow task system, we have
 * a problem... maybe we should find a better way of choosing between slow
 * and fast tasks... or fix the problems with riscos/hub/main.c
 */

#if !defined(TASK_SLOW) && !defined(TASK_FAST)
#define TASK_FAST
#endif

#ifdef TASK_SLOW
#include "usb/task-slow.h"
#endif

#ifdef TASK_FAST
#include "usb/task-fast.h"
#endif


#endif /* __USB_TASKS_H */
