OSDN Git Service
(root)
/
roast
/
roast.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4efdc05
)
こうしないと、パラメータ一個引数上手くいかないのでしょうか・・・
author
myun2
<myun2@nwhite.info>
Sun, 9 Sep 2012 06:43:06 +0000
(15:43 +0900)
committer
myun2
<myun2@nwhite.info>
Sun, 9 Sep 2012 06:43:06 +0000
(15:43 +0900)
roast/include/roast/multitask/thread/thread.hpp
patch
|
blob
|
history
roast/test/socket_test/socket_server_test.cpp
patch
|
blob
|
history
roast/test/socket_test/socket_test.vcproj
patch
|
blob
|
history
roast/test/thread_test/thread_test.cpp
patch
|
blob
|
history
diff --git
a/roast/include/roast/multitask/thread/thread.hpp
b/roast/include/roast/multitask/thread/thread.hpp
index
b70e9db
..
34c1a13
100644
(file)
--- a/
roast/include/roast/multitask/thread/thread.hpp
+++ b/
roast/include/roast/multitask/thread/thread.hpp
@@
-87,6
+87,14
@@
namespace roast
if ( start(func,param,opt) != true )
thread_exception("thread start failed.");
}*/
+ thread_(thread_& th){} // TODO
+
+ template <typename _Func>
+ thread_(_Func func)
+ {
+ thread_(func, 0);
+ }
+
template <typename _Func, typename _Param>
thread_(_Func func, _Param param=0, void* opt=NULL)
{
diff --git
a/roast/test/socket_test/socket_server_test.cpp
b/roast/test/socket_test/socket_server_test.cpp
index
2e74ae8
..
1bc3648
100644
(file)
--- a/
roast/test/socket_test/socket_server_test.cpp
+++ b/
roast/test/socket_test/socket_server_test.cpp
@@
-1,6
+1,8
@@
#include "roast/net/socket.hpp"
-
void
main( void )
+
int
main( void )
{
+
+ return 0;
}
diff --git
a/roast/test/socket_test/socket_test.vcproj
b/roast/test/socket_test/socket_test.vcproj
index
ea2a3d5
..
6f42731
100644
(file)
--- a/
roast/test/socket_test/socket_test.vcproj
+++ b/
roast/test/socket_test/socket_test.vcproj
@@
-175,7
+175,7
@@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath=".\socket_test.cpp"
+ RelativePath=".\socket_
server_
test.cpp"
>
</File>
</Filter>
diff --git
a/roast/test/thread_test/thread_test.cpp
b/roast/test/thread_test/thread_test.cpp
index
adf62f5
..
1d07598
100644
(file)
--- a/
roast/test/thread_test/thread_test.cpp
+++ b/
roast/test/thread_test/thread_test.cpp
@@
-1,6
+1,14
@@
+#include <stdio.h>
#include "roast/thread.hpp"
+int func(int)
+{
+ printf("thread.\n");
+ return 0;
+}
+
int main()
{
+ roast::thread th(func);
return 0;
}