+ /* low level operations */
+ void init_backend();
+ int (*d_open)(const char *pathname, int flags, ...);
+ int (*d_read)(int fd, void *buffer, unsigned int count);
+ int (*d_write)(int fd, const void *buffer, unsigned int count);
+ int (*d_close)(int fd);
+ int (*d_ioctl)(int fd, unsigned long int request, ...);
+
+ /*
+ * Locking and blocking calls
+ */
+#ifdef SD_DEBUG_LOCK
+ void _r_dlock(const char *, int); /* in lock.c */
+ void _r_dunlock(const char *, int); /* in lock.c */
+ void _dlock(const char *, int); /* in lock.c */
+ void _dunlock(const char *, int); /* in lock.c */
+#else
+ void r_dlock(); /* in lock.c */
+ void r_dunlock() { dunlock(); }
+ void dlock() { P(m_mutex); }
+ void dunlock() { V(m_mutex); }
+#endif
+ void dblock(int why); /* in lock.c */
+ void dunblock(bool locked=false); /* in lock.c */
+ void set_blocked(int block) { m_blocked = block; };
+ int blocked() const { return m_blocked; };
+ bool is_blocked() const { return m_blocked != BST_NOT_BLOCKED; };
+ const char *print_blocked() const; /* in dev.c */
+