Device types and char device registering.
[cascardo/kernel/old_slides/.git] / _ldd.xml
index e26b90a..4930ffc 100644 (file)
--- a/_ldd.xml
+++ b/_ldd.xml
@@ -203,4 +203,24 @@ boolean, integers or strings, are given by the user.
 </para>
 </foil>
 
+<foil>
+<title>Device types and numbers</title>
+<para>
+Linux devices may be of different types, including character devices,
+block devices or network devices. Both character and block devices have
+identifying numbers, a major and a minor number.
+</para>
+<para>
+In Linux, major and minor numbers have to be requested or allocated. The
+calls to do that are:
+</para>
+<para>
+int register\_chrdev\_region (dev\_t first, unsigned int count, char
+*name);
+int alloc\_chrdev\_region (dev\_t *dev, unsigned int firstminor,
+unsigned int count, char *name);
+void unregister\_chrdev\_region (dev\_t dev, unsigned int count);
+</para>
+</foil>
+
 </slides>