Commit 01edca94 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Initial API header + branding

parent 8f9dbdb4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
Data Scheduler
==============
Norns Data Scheduler
====================
+2 −2
Original line number Diff line number Diff line
@@ -36,9 +36,9 @@ FILES=(
    "Makefile.am"
    "examples/Makefile.am"
    "examples/app.c"
    "include/libnorn.h"
    "include/norns.h"
    "lib/Makefile.am"
    "lib/norn.c"
    "lib/norns.c"
    "src/dloom.cpp"
)

+1 −1
Original line number Diff line number Diff line
@@ -33,5 +33,5 @@ app_CPPFLAGS = \
	-I$(top_srcdir)/include

app_LDADD = \
	$(top_builddir)/lib/libnorn.la
	$(top_builddir)/lib/libnorns.la
+2 −2
Original line number Diff line number Diff line
@@ -21,12 +21,12 @@
 * along with Data Scheduler.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <libnorn.h>
#include <norns.h>
#include <stdio.h>


int main() {
   printf("Hello, World! I'm the app \n");
   initialize();
   norns_init();
   return 0;
}
+34 −10
Original line number Diff line number Diff line
@@ -21,17 +21,41 @@
 * along with Data Scheduler.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __NORN_LIB_H__
#define __NORN_LIB_H__
#ifndef __NORNS_LIB_H__
#define __NORNS_LIB_H__ 1

#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <sys/types.h>

void initialize();
__BEGIN_DECLS

#ifdef __cplusplus
}; // extern "C"
#endif
/* I/O task descriptor */
struct norns_iotd {
    int ni_tid;   /* task identifier */
    int ni_ibid;  /* input backend identifier */
    int ni_obid;  /* output backend identifier */
    int ni_type;  /* type of task */
};

#endif /* __NORN_LIB_H__ */
/*   */
enum {
    NORNS
};

void norns_init() __THROW __nonnull ((1));

/* Enqueue an asynchronous I/O task */
int norns_transfer(struct norns_iotd* iotdp) __THROW __nonnull((1));

/* Try to cancel an asynchronous I/O task associated with iotdp */
ssize_t norns_cancel(struct norns_iotd* iotdp) __THROW __nonnull((1));

/* Retrieve return status associated with iotdp */
ssize_t norns_return(struct norns_iotd* iotdp) __THROW __nonnull((1));

/* Retrieve error status associated with iotdp */
int norns_error(struct norns_iotd* iotdp) __THROW __nonnull((1));

__END_DECLS

#endif /* __NORNS_LIB_H__ */
Loading