Skip to content

Commit 4209365

Browse files
Merge branch 'develop' of https://github.com/HerbertKoelman/cpp-pthread into develop
2 parents 4f6b70f + 1fb6bcd commit 4209365

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

Makefile.in

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ PTHREADLIB=libcpp-pthread.a
1717
all:
1818
cd src && $(MAKE) clean all
1919

20-
dist:
21-
cd src && $(MAKE) dist
22-
tar cf - bin udataobj locale doc | gzip -c > distrib/$(PACKAGE)
20+
pkg:
21+
tar cf - ./ | gzip -c > distrib/$(PACKAGE)
2322

2423
globber:clean
25-
$(RM) -R Makefile autom4te.cache config.log config.status configure
26-
cd src && $(MAKE) globber
24+
-$(RM) -R Makefile autom4te.cache config.log config.status
25+
-(cd src && $(MAKE) globber)
2726

2827
clean:
2928
cd src && $(MAKE) clean

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ Install moves files into your system's default localtion of headers and librarie
1616
configure --prefix=/usr/local
1717
```
1818

19-
[Documentation](http://herbertkoelman.github.io/cpp-pthread/doc/html/) can be generated with this command:
19+
[Doxygen documentation](http://herbertkoelman.github.io/cpp-pthread/doc/html/) can be generated with this command:
2020
```
2121
make doxygen
2222
...
2323
```
2424

25+
The target `pkg` will produce au tar.gz.
26+
2527
This command creates a `doc` directory wich will contain the generated documentation.
2628

2729
> **warning** generating documentation requires that doxygen is installed.
2830
31+
The confugre file is not versionned, therefore it is required to run `autoconf` to generate one
32+
```
33+
autoconf
34+
( cd src && autoconf )
35+
( cd tests && autoconf )
36+
```
37+
2938
### How to use it
3039

3140
Once compiled and installed in a location that suites you, use your compiler options to reference the headers and the libraries directory. In almoast all casses you can:

include/pthread/thread.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,14 @@ namespace pthread {
223223
public:
224224
virtual ~abstract_thread();
225225

226+
/** start running the `run()` method in a new thread.
227+
*/
226228
void start();
227229

230+
/** joins this thread.
231+
*
232+
* an exception is thrown if deadlock condition are detected.
233+
*/
228234
int join() { return _thread->join() ;};
229235

230236
private:

src/Makefile.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ libcpp-pthread.a: $(OBJECTS)
4444
${AR} ${LIBDIR}/$@ $(OBJECTS)
4545
$(RANLIB) ${LIBDIR}/$@
4646

47-
dist:
48-
$(MV) $(TARGETS) $(BINDIR)
49-
5047
globber: clean
51-
$(RM) -R Makefile autom4te.cache config.log config.status configure
48+
-$(RM) -R Makefile autom4te.cache config.log config.status
5249

5350
clean:
5451
${RM} *.o core *.a

tests/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CPPFLAGS="$CPPFLAGS $CFLAGS"
5454

5555
# Checks for libraries.
5656
AC_CHECK_LIB([pthread], [pthread_create],[],[AC_ERROR([missing pthread library.])])
57-
AC_CHECK_LIB([cpp-pthread], [cpp_pthread_version],[],[AC_ERROR([missing cpp-thread library.])])
57+
#AC_CHECK_LIB([cpp-pthread], [cpp_pthread_version],[],[AC_ERROR([missing cpp-thread library.])])
5858

5959
# Checks for header files.
6060
#AC_HEADER_STDC

0 commit comments

Comments
 (0)