优化多线程: 线程优先级、线程分离、线程先到先得(实时调度)算法

This commit is contained in:
2023-05-05 10:45:19 +08:00
parent 250a958832
commit 2dc3eea220
3 changed files with 39 additions and 12 deletions

View File

@@ -2,7 +2,7 @@ CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
STRIP := $(CROSS_COMPILE)strip
CFLAGS = -Wall -g -O3
LIB = -lssh2 -pthread
LIB = -lssh2 -pthread -static
OBJ = tunnel
SSH2_LIB := $(shell pkg-config --static --libs --cflags libssh2)
@@ -12,7 +12,7 @@ all:forward-tunnel reverse-tunnel
forward-tunnel: forward-tunnel.o
$(CC) $(CFLAGS) -o forward-tunnel $^ $(SSH2_LIB) $(LIB)
$(STRIP) forward-tunnel
: $(STRIP) forward-tunnel
reverse-tunnel: reverse-tunnel.o
$(CC) $(CFLAGS) -o reverse-tunnel $^ $(SSH2_LIB) $(LIB)