uvt: add SHL_EXPORT to cdev+ctx subsystems
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 5 Mar 2013 00:27:32 +0000 (01:27 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 5 Mar 2013 00:27:32 +0000 (01:27 +0100)
We need to export the symbols to make use of them. This exports all useful
ctx+cdev functions for outside use. The other subsystems still need to get
reviewed before we export them.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
docs/sym/libuvt.sym
src/uvt_cdev.c
src/uvt_ctx.c

index d4eed58..a747c43 100644 (file)
@@ -30,6 +30,12 @@ global:
        uvt_ctx_unref;
        uvt_ctx_get_fd;
        uvt_ctx_dispatch;
+
+       uvt_cdev_new;
+       uvt_cdev_ref;
+       uvt_cdev_unref;
+       uvt_cdev_register_cb;
+       uvt_cdev_unregister_cb;
 local:
        *;
 };
index e63bcf0..291857b 100644 (file)
@@ -400,6 +400,7 @@ static void uvt_cdev_destroy(struct uvt_cdev *cdev)
        close(cdev->fd);
 }
 
+SHL_EXPORT
 int uvt_cdev_new(struct uvt_cdev **out, struct uvt_ctx *ctx,
                 const char *name, unsigned int major, unsigned int minor)
 {
@@ -442,6 +443,7 @@ err_free:
        return ret;
 }
 
+SHL_EXPORT
 void uvt_cdev_ref(struct uvt_cdev *cdev)
 {
        if (!cdev || !cdev->ref)
@@ -450,6 +452,7 @@ void uvt_cdev_ref(struct uvt_cdev *cdev)
        ++cdev->ref;
 }
 
+SHL_EXPORT
 void uvt_cdev_unref(struct uvt_cdev *cdev)
 {
        if (!cdev || !cdev->ref || --cdev->ref)
@@ -463,6 +466,7 @@ void uvt_cdev_unref(struct uvt_cdev *cdev)
        free(cdev);
 }
 
+SHL_EXPORT
 int uvt_cdev_register_cb(struct uvt_cdev *cdev, uvt_cdev_cb cb, void *data)
 {
        if (!cdev)
@@ -471,6 +475,7 @@ int uvt_cdev_register_cb(struct uvt_cdev *cdev, uvt_cdev_cb cb, void *data)
        return shl_hook_add_cast(cdev->hook, cb, data, false);
 }
 
+SHL_EXPORT
 void uvt_cdev_unregister_cb(struct uvt_cdev *cdev, uvt_cdev_cb cb, void *data)
 {
        if (!cdev)
index a70e687..60185ec 100644 (file)
 #include <string.h>
 #include <unistd.h>
 #include "shl_llog.h"
+#include "shl_misc.h"
 #include "uvt.h"
 #include "uvt_internal.h"
 
 #define LLOG_SUBSYSTEM "uvt_ctx"
 
+SHL_EXPORT
 int uvt_ctx_new(struct uvt_ctx **out, uvt_log_t log, void *log_data)
 {
        struct uvt_ctx *ctx;
@@ -80,6 +82,7 @@ err_free:
        return ret;
 }
 
+SHL_EXPORT
 void uvt_ctx_ref(struct uvt_ctx *ctx)
 {
        if (!ctx || !ctx->ref)
@@ -88,6 +91,7 @@ void uvt_ctx_ref(struct uvt_ctx *ctx)
        ++ctx->ref;
 }
 
+SHL_EXPORT
 void uvt_ctx_unref(struct uvt_ctx *ctx)
 {
        if (!ctx || !ctx->ref || --ctx->ref)
@@ -100,6 +104,7 @@ void uvt_ctx_unref(struct uvt_ctx *ctx)
        free(ctx);
 }
 
+SHL_EXPORT
 int uvt_ctx_get_fd(struct uvt_ctx *ctx)
 {
        if (!ctx)
@@ -108,6 +113,7 @@ int uvt_ctx_get_fd(struct uvt_ctx *ctx)
        return ev_eloop_get_fd(ctx->eloop);
 }
 
+SHL_EXPORT
 void uvt_ctx_dispatch(struct uvt_ctx *ctx)
 {
        if (!ctx)