You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srs/trunk/3rdparty/st-srs
xiaozhihong 1c74083de8 Revert "use libco instead of state-thread(st), still have some bug"
This reverts commit 7c8a35aea9.
5 years ago
..
docs Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
examples Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
extensions Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
.gitignore Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
Makefile Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
README Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
README.md Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
common.h Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
event.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
io.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
key.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
libst.def Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
md.S Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
md.h Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
osguess.sh Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
public.h Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
sched.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
st.pc.in Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
st.spec Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
stk.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago
sync.c Revert "use libco instead of state-thread(st), still have some bug" 5 years ago

README.md

state-threads

Fork from http://sourceforge.net/projects/state-threads, patched for SRS.

See: https://github.com/ossrs/state-threads/blob/srs/README

For original ST without any changes, checkout the ST master branch.

Branch SRS

The branch srs will be patched the following patches:

Docs

Usage

Get code:

git clone https://github.com/ossrs/state-threads.git st-1.9 &&
git checkout -b srs origin/srs

For Linux:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL"

For OSX:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE"

Linux with valgrind:

make linux-debug EXTRA_CFLAGS="-DMD_VALGRIND"

Remark: User must install valgrind, for instance, in centos6 sudo yum install -y valgrind valgrind-devel.

Linux with valgrind and epoll:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL -DMD_VALGRIND"

For OSX, user must specifies the valgrind header files:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE -DMD_VALGRIND -I/usr/local/include"

Remark: Latest OSX does not support ST, please use docker to run ST.

Valgrind

How to debug with gdb under valgrind, read valgrind manual.

About startup parameters, read valgrind cli.

Important cli options:

  1. --undef-value-errors=<yes|no> [default: yes], Controls whether Memcheck reports uses of undefined value errors. Set this to no if you don't want to see undefined value errors. It also has the side effect of speeding up Memcheck somewhat.
  2. --leak-check=<no|summary|yes|full> [default: summary], When enabled, search for memory leaks when the client program finishes. If set to summary, it says how many leaks occurred. If set to full or yes, each individual leak will be shown in detail and/or counted as an error, as specified by the options --show-leak-kinds and --errors-for-leak-kinds.
  3. --track-origins=<yes|no> [default: no], Controls whether Memcheck tracks the origin of uninitialised values. By default, it does not, which means that although it can tell you that an uninitialised value is being used in a dangerous way, it cannot tell you where the uninitialised value came from. This often makes it difficult to track down the root problem.
  4. --show-reachable=<yes|no> , --show-possibly-lost=<yes|no>, to show the using memory.

Winlin 2016