Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HR_Socket_Msg_Demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马伊齐
HR_Socket_Msg_Demo
Commits
8e28453b
Commit
8e28453b
authored
Dec 19, 2023
by
马伊齐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进程间信号通信Demo(完成)
parent
f3df337e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
MsgSendPluseA.c
msg_signal_send_recv/MsgSendPluseA.c
+25
-0
MsgSendPluseB.c
msg_signal_send_recv/MsgSendPluseB.c
+27
-0
No files found.
msg_signal_send_recv/MsgSendPluseA.c
0 → 100644
View file @
8e28453b
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "../lib/sock_msg.h"
int
main
()
{
uint16_t
type
=
1
;
u_int32_t
code
=
1
;
msg_local_ssignal_init
();
msg_local_send_pulse
(
type
,
code
);
return
0
;
}
\ No newline at end of file
msg_signal_send_recv/MsgSendPluseB.c
0 → 100644
View file @
8e28453b
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "../lib/sock_msg.h"
int
main
()
{
uint16_t
type
=
2
;
u_int32_t
code
=
2
;
msg_local_rsignal_init
();
printf
(
"%hd %d
\n
"
,
type
,
code
);
msg_local_recv_pulse
(
&
type
,
&
code
);
printf
(
"%hd %d
\n
"
,
type
,
code
);
return
0
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment