Overview
Context
Changes
Modified configure.ac
from [5516946ed9]
to [b8ad6a105d].
︙ | | |
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
-
+
-
+
|
if test x"$cross_compiling" = x"yes"; then
case "$host" in
*-*-mingw*)
AC_PATH_PROG(WINE, wine)
if test x"$WINE" != "x"; then
AC_SUBST(TESTS, "tests_new tests")
AC_SUBST(TESTS, "tests_new")
AC_SUBST(TEST_LAUNCHER, "$WINE")
fi
;;
esac
else
AC_SUBST(TESTS, "tests_new tests")
AC_SUBST(TESTS, "tests_new")
fi
BUILDSYS_TOUCH_DEPS
AC_SUBST(PACKAGE, objfw)
AC_CONFIG_FILES([buildsys.mk extra.mk objfw-config])
AC_CONFIG_HEADERS(config.h)
|
︙ | | |
Deleted tests/Makefile version [43656d1194].
1
2
3
4
5
|
|
-
-
-
-
-
|
include ../extra.mk
SUBDIRS = ${OBJC_SYNC}
include ../buildsys.mk
|
Deleted tests/objc_sync/Makefile version [abf723224c].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
PROG_NOINST = objc_sync${PROG_SUFFIX}
SRCS = objc_sync.m
include ../../buildsys.mk
include ../../extra.mk
CPPFLAGS += -I../../src -I../..
LIBS := -L../../src -lobjfw ${LIBS}
.PHONY: run
all: run
run: ${PROG_NOINST}
rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib
if test -f ../../src/libobjfw.so; then \
ln -s ../../src/libobjfw.so libobjfw.so.0; \
ln -s ../../src/libobjfw.so libobjfw.so.0.1; \
fi
if test -f ../../src/libobjfw.dll; then \
ln ../../src/libobjfw.dll libobjfw.dll; \
fi
if test -f ../../src/libobjfw.dylib; then \
ln -s ../../src/libobjfw.dylib libobjfw.dylib; \
fi
LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \
rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \
exit $$EXIT
|
Deleted tests/objc_sync/objc_sync.m version [3fffa6c9f2].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
/*
* Copyright (c) 2008 - 2009
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#include "config.h"
#include <stdio.h>
#import "OFString.h"
#import "OFThread.h"
OFObject *lock;
@interface MyThread: OFThread
- main;
@end
@implementation MyThread
- main
{
printf("[%s] Entering #1\n", [object cString]);
@synchronized (lock) {
printf("[%s] Entering #2\n", [object cString]);
@synchronized (lock) {
printf("[%s] Hello!\n", [object cString]);
}
printf("[%s] Left #2\n", [object cString]);
}
printf("[%s] Left #1\n", [object cString]);
return nil;
}
@end
int
main()
{
lock = [[OFObject alloc] init];
MyThread *t1 = [MyThread threadWithObject: @"A"];
MyThread *t2 = [MyThread threadWithObject: @"B"];
[t1 join];
[t2 join];
return 0;
}
|
Added tests_new/objc_sync/Makefile version [b3c9a544b3].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
PROG_NOINST = objc_sync${PROG_SUFFIX}
SRCS = test.m
.PHONY: run
run: all
rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib
if test -f ../../src/libobjfw.so; then \
ln -s ../../src/libobjfw.so libobjfw.so.0; \
ln -s ../../src/libobjfw.so libobjfw.so.0.1; \
fi
if test -f ../../src/libobjfw.dll; then \
ln ../../src/libobjfw.dll libobjfw.dll; \
fi
if test -f ../../src/libobjfw.dylib; then \
ln -s ../../src/libobjfw.dylib libobjfw.dylib; \
fi
LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \
rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \
exit $$EXIT
include ../../buildsys.mk
CPPFLAGS += -I../../src -I../..
LIBS := -L../../src -lobjfw ${LIBS}
|
| | | | | | | | | | | | | | | | | | | | | | | | |
Added tests_new/objc_sync/test.m version [3fffa6c9f2].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
/*
* Copyright (c) 2008 - 2009
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#include "config.h"
#include <stdio.h>
#import "OFString.h"
#import "OFThread.h"
OFObject *lock;
@interface MyThread: OFThread
- main;
@end
@implementation MyThread
- main
{
printf("[%s] Entering #1\n", [object cString]);
@synchronized (lock) {
printf("[%s] Entering #2\n", [object cString]);
@synchronized (lock) {
printf("[%s] Hello!\n", [object cString]);
}
printf("[%s] Left #2\n", [object cString]);
}
printf("[%s] Left #1\n", [object cString]);
return nil;
}
@end
int
main()
{
lock = [[OFObject alloc] init];
MyThread *t1 = [MyThread threadWithObject: @"A"];
MyThread *t2 = [MyThread threadWithObject: @"B"];
[t1 join];
[t2 join];
return 0;
}
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |