[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cdi-devel] [PATCH 1/4] New header cdi-osdep.h



* cdi: OS independent parts of cdi.h are now in cdi-osdep.h
+ cdi: CDI_DRIVER macro which is used to declare drivers (in preparation
  of the removal of main() from the drivers)

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 include/cdi-osdep.h |   35 +++++++++++++++++++++++++++++++++++
 include/cdi.h       |    3 +--
 2 files changed, 36 insertions(+), 2 deletions(-)
 create mode 100644 include/cdi-osdep.h

diff --git a/include/cdi-osdep.h b/include/cdi-osdep.h
new file mode 100644
index 0000000..6227e91
--- /dev/null
+++ b/include/cdi-osdep.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2009 Kevin Wolf
+ *
+ * This program is free software. It comes without any warranty, to
+ * the extent permitted by applicable law. You can redistribute it
+ * and/or modify it under the terms of the Do What The Fuck You Want
+ * To Public License, Version 2, as published by Sam Hocevar. See
+ * http://sam.zoy.org/projects/COPYING.WTFPL for more details.
+ */
+
+#ifndef _CDI_OSDEP_H_
+#define _CDI_OSDEP_H_
+
+/**
+ * \german
+ * Muss fuer jeden CDI-Treiber genau einmal verwendet werden, um ihn bei der
+ * CDI-Bibliothek zu registrieren
+ *
+ * @param name Name des Treibers
+ * @param drv Pointer auf eine Treiberbeschreibung (struct cdi_driver*)
+ * @param deps Liste von Namen anderer Treiber, von denen der Treiber abhaengt
+ * \endgerman
+ *
+ * \english
+ * CDI_DRIVER shall be used exactly once for each CDI driver. It registers
+ * the driver with the CDI library.
+ *
+ * @param name Name of the driver
+ * @param drv Pointer to a driver description (struct cdi_driver*)
+ * @param deps List of names of other drivers on which this driver depends
+ * \endenglish
+ */
+#define CDI_DRIVER(name, drv, deps...) /* TODO */
+
+#endif
diff --git a/include/cdi.h b/include/cdi.h
index 06e1904..ed28c78 100644
--- a/include/cdi.h
+++ b/include/cdi.h
@@ -16,10 +16,9 @@
 
 #include <stdint.h>
 
+#include "cdi-osdep.h"
 #include "cdi/lists.h"
 
-#define CDI_STANDALONE
-
 typedef enum {
     CDI_UNKNOWN         = 0,
     CDI_NETWORK         = 1,
-- 
1.6.0.2