Skip to content

Commit 5ebefd4

Browse files
committed
Reorganization: make io/ a top-level directory.
Don't enforce a namespace scheme on headers.
1 parent 5f3b5bf commit 5ebefd4

22 files changed

+33
-35
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
libdlb - data structures and utilities library
2-
Copyright (C) 2011 Daniel Beer <[email protected]>
2+
Copyright (C) 2011-2013 Daniel Beer <[email protected]>
33

44
Permission to use, copy, modify, and/or distribute this software for any
55
purpose with or without fee is hereby granted, provided that the above

Makefile

+21-23
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ TESTS = \
2727
tests/bint.test \
2828
tests/slist.test \
2929
tests/cbuf.test \
30-
tests/io/syserr.test \
31-
tests/io/clock.test \
32-
tests/io/thr.test \
33-
tests/io/runq.test \
34-
tests/io/waitq.test \
35-
tests/io/ioq.test \
36-
tests/io/mailbox.test
37-
CFLAGS = -O1 -Wall -ggdb -Isrc
30+
tests/syserr.test \
31+
tests/clock.test \
32+
tests/thr.test \
33+
tests/runq.test \
34+
tests/waitq.test \
35+
tests/ioq.test \
36+
tests/mailbox.test
37+
CFLAGS = -O1 -Wall -ggdb -Isrc -Iio
3838
CC = gcc
3939

4040
all: $(TESTS)
@@ -49,8 +49,6 @@ test: $(TESTS)
4949
clean:
5050
rm -f */*.o
5151
rm -f tests/*.test
52-
rm -f */*/*.o
53-
rm -f tests/*/*.test
5452

5553
tests/containers.test: tests/test_containers.o
5654
$(CC) -o $@ $^
@@ -92,31 +90,31 @@ tests/slist.test: tests/test_slist.o src/slist.o
9290
tests/cbuf.test: tests/test_cbuf.o src/cbuf.o
9391
$(CC) -o $@ $^
9492

95-
tests/io/syserr.test: tests/io/test_syserr.o
93+
tests/syserr.test: tests/test_syserr.o
9694
$(CC) -o $@ $^
9795

98-
tests/io/clock.test: tests/io/test_clock.o src/io/clock.o
96+
tests/clock.test: tests/test_clock.o io/clock.o
9997
$(CC) -o $@ $^ -lrt
10098

101-
tests/io/thr.test: tests/io/test_thr.o src/io/thr.o src/io/clock.o
99+
tests/thr.test: tests/test_thr.o io/thr.o io/clock.o
102100
$(CC) -o $@ $^ -lpthread -lrt
103101

104-
tests/io/runq.test: tests/io/test_runq.o src/io/runq.o src/io/thr.o \
105-
src/slist.o src/io/clock.o
102+
tests/runq.test: tests/test_runq.o io/runq.o io/thr.o \
103+
src/slist.o io/clock.o
106104
$(CC) -o $@ $^ -lpthread -lrt
107105

108-
tests/io/waitq.test: tests/io/test_waitq.o src/io/waitq.o src/io/runq.o \
109-
src/io/thr.o src/io/clock.o src/slist.o src/rbt.o \
110-
src/rbt_iter.o
106+
tests/waitq.test: tests/test_waitq.o io/waitq.o io/runq.o \
107+
io/thr.o io/clock.o src/slist.o src/rbt.o \
108+
src/rbt_iter.o
111109
$(CC) -o $@ $^ -lpthread -lrt
112110

113-
tests/io/ioq.test: tests/io/test_ioq.o src/io/ioq.o src/io/waitq.o \
114-
src/io/runq.o src/io/thr.o src/io/clock.o src/slist.o \
115-
src/rbt.o src/rbt_iter.o
111+
tests/ioq.test: tests/test_ioq.o io/ioq.o io/waitq.o \
112+
io/runq.o io/thr.o io/clock.o src/slist.o \
113+
src/rbt.o src/rbt_iter.o
116114
$(CC) -o $@ $^ -lpthread -lrt
117115

118-
tests/io/mailbox.test: tests/io/test_mailbox.o src/io/mailbox.o src/io/runq.o \
119-
src/io/thr.o src/slist.o
116+
tests/mailbox.test: tests/test_mailbox.o io/mailbox.o io/runq.o \
117+
io/thr.o src/slist.o
120118
$(CC) -o $@ $^ -lpthread
121119

122120
%.o: %.c

src/io/clock.c io/clock.c

File renamed without changes.

src/io/clock.h io/clock.h

File renamed without changes.

src/io/ioq.c io/ioq.c

File renamed without changes.

src/io/ioq.h io/ioq.h

File renamed without changes.

src/io/mailbox.c io/mailbox.c

File renamed without changes.

src/io/mailbox.h io/mailbox.h

File renamed without changes.

src/io/runq.c io/runq.c

File renamed without changes.

src/io/runq.h io/runq.h

File renamed without changes.

src/io/syserr.h io/syserr.h

File renamed without changes.

src/io/thr.c io/thr.c

File renamed without changes.

src/io/thr.h io/thr.h

File renamed without changes.

src/io/waitq.c io/waitq.c

File renamed without changes.

src/io/waitq.h io/waitq.h

File renamed without changes.

tests/io/test_clock.c tests/test_clock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <stdio.h>
1818
#include <assert.h>
19-
#include "io/clock.h"
19+
#include "clock.h"
2020

2121
int main(void)
2222
{

tests/io/test_ioq.c tests/test_ioq.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <assert.h>
1818
#include <unistd.h>
1919
#include <stdio.h>
20-
#include "io/ioq.h"
20+
#include "ioq.h"
2121
#include "containers.h"
2222

2323
#define N 65536

tests/io/test_mailbox.c tests/test_mailbox.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <stdio.h>
1818
#include <assert.h>
19-
#include "io/mailbox.h"
19+
#include "mailbox.h"
2020
#include "containers.h"
2121

2222
#define N 10

tests/io/test_runq.c tests/test_runq.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#include <assert.h>
1818
#include <stdio.h>
19-
#include "io/clock.h"
20-
#include "io/runq.h"
19+
#include "clock.h"
20+
#include "runq.h"
2121

2222
#define N_TASKS 10
2323

tests/io/test_syserr.c tests/test_syserr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <stdio.h>
1818
#include <assert.h>
19-
#include "io/syserr.h"
19+
#include "syserr.h"
2020

2121
int main(void)
2222
{

tests/io/test_thr.c tests/test_thr.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
#include <stdio.h>
1818
#include <assert.h>
19-
#include "io/thr.h"
20-
#include "io/syserr.h"
21-
#include "io/clock.h"
19+
#include "thr.h"
20+
#include "syserr.h"
21+
#include "clock.h"
2222

2323
static int counter;
2424
static thr_thread_t worker;

tests/io/test_waitq.c tests/test_waitq.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#include <assert.h>
1818
#include <stdio.h>
19-
#include "io/waitq.h"
20-
#include "io/clock.h"
19+
#include "waitq.h"
20+
#include "clock.h"
2121

2222
#define N_TIMERS 10
2323

0 commit comments

Comments
 (0)