Skip to content

Commit 02213a8

Browse files
author
Herbert Koelman
committed
Merge branch 'iss-62' into develop
2 parents 86028cf + 60028ac commit 02213a8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

include/pthread/thread.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace pthread {
202202
* }
203203
* } // end of critical section
204204
*
205-
* pthread::this_thread::sleep(200);
205+
* pthread::this_thread::sleep_for(200);
206206
* };
207207
*
208208
* private:
@@ -342,7 +342,7 @@ namespace pthread {
342342
*
343343
* @param millis time to wait.
344344
*/
345-
void sleep(const int millis);
345+
void sleep_for(const int millis);
346346

347347
/** @return current thread id/reference */
348348
pthread_t get_id() ;

src/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ AC_SUBST(OBJECTS,$OBJECTS)
4040
AC_MSG_CHECKING([for specific $CXX compiler options])
4141
case "$CXX" in
4242
xlC_r | xlC)
43-
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences:rvaluereferences -qsourcetype=c++ $CPPFLAGS"
43+
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences -qsourcetype=c++ $CPPFLAGS"
4444
CFLAGS="-bh:5 -qmaxmem=-1 -q$BITS $CFLAGS"
4545
CXXFLAGS="-O"
4646
LDFLAGS="$LDFLAGS -brtl -bmaxdata:0x80000000"

src/thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace pthread {
1414

1515
namespace this_thread {
1616

17-
void sleep(const int millis){
17+
void sleep_for(const int millis){
1818
usleep(millis * 1000); //NOSONAR this wil be replaced by the much better C++11 implementation std::this_thread::sleep_for
1919
}
2020

tests/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ AC_SUBST(OBJECTS,$OBJECTS)
3939
AC_MSG_CHECKING([for specific $CXX compiler options])
4040
case "$CXX" in
4141
xlC_r | xlC)
42-
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences:rvaluereferences -qsourcetype=c++ -O $CPPFLAGS"
42+
CPPFLAGS="-qlanglvl=extended0x:decltype:static_assert:rvaluereferences -qsourcetype=c++ -O $CPPFLAGS"
4343
CFLAGS="-bh:5 -qmaxmem=-1 -q$BITS $CFLAGS"
4444
CXXFLAGS="-O"
4545
LDFLAGS="$LDFLAGS -brtl -bmaxdata:0x80000000"

tests/without-cpp11-pthread-tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class worker: public pthread::abstract_thread {
6767
}
6868

6969
message("worker sleeping");
70-
pthread::this_thread::sleep(200);
70+
pthread::this_thread::sleep_for(200);
7171
message("worker class is ending");
7272

7373
} catch ( pthread::pthread_exception &err ){
@@ -122,6 +122,6 @@ int main(int argc, const char * argv[]) {
122122
message("Unhandled exception was thrown in main");
123123
}
124124

125-
pthread::this_thread::sleep(5*1000);
125+
pthread::this_thread::sleep_for(5*1000);
126126
message( "end reached");
127127
}

0 commit comments

Comments
 (0)