- Notifications
You must be signed in to change notification settings - Fork 196
Expand file tree
/
Copy pathTestThreadB.cpp
More file actions
Latest commit
executable file
·54 lines (31 loc) · 704 Bytes
/
Copy pathTestThreadB.cpp
File metadata and controls
executable file
·54 lines (31 loc) · 704 Bytes
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
54
#include"TestThreadB.h"
#include"COperatingSystemFactory.h"
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#include<assert.h>
TestThreadB::TestThreadB(constchar *m_name):
CThread(m_name)
{
//add your code here
}
TestThreadB::~TestThreadB()
{
}
voidTestThreadB::mainLoop()
{
unsignedint code=0;
char *p_msg="hello Thread A";
while(1)
{
printf(">>>>>>>%s is Running....send data to message queue...\n",p_thread_name);
p_msg_send->sendMsg(code, (void *)p_msg);
code++;
p_opration_system->sleepSec(1);
}
}
voidTestThreadB::setMsgQueue(CMsgQueue *q)
{
p_msg_send=q;
}