Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-03-16 18:05:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7744053d28cff2949566f9ccb84089d774399175
7744053d
1 parent
350e7b8b
add arm research files, change to 0.9.16
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
97 行增加
和
1 行删除
trunk/research/arm/jmp.cpp
trunk/research/arm/jmp_sp.cpp
trunk/research/arm/test.cpp
trunk/src/core/srs_core.hpp
trunk/research/arm/jmp.cpp
0 → 100644
查看文件 @
7744053
/*
arm-linux-gnueabi-g++ -o jmp jmp.cpp -static
arm-linux-gnueabi-strip jmp
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf
env_func1
,
env_func2
;
int
sum
=
0
;
void
func1
()
{
int
ret
=
setjmp
(
env_func1
);
printf
(
"setjmp func1 ret=%d
\n
"
,
ret
);
if
(
sum
<=
0
)
{
return
;
}
if
(
sum
++
>
1000
)
{
return
;
}
// jmp to func2
longjmp
(
env_func2
,
3
);
}
void
func2
()
{
int
ret
=
setjmp
(
env_func2
);
printf
(
"setjmp func2 ret=%d
\n
"
,
ret
);
if
(
sum
<=
0
)
{
return
;
}
// jmp to func1
longjmp
(
env_func1
,
2
);
}
int
main
(
int
argc
,
char
**
argv
)
{
printf
(
"hello, setjmp/longjmp!
\n
"
);
func1
();
sum
++
;
func2
();
printf
(
"jmp finished, sum=%d
\n
"
,
sum
);
return
0
;
}
...
...
trunk/research/arm/jmp_sp.cpp
0 → 100644
查看文件 @
7744053
/*
arm-linux-gnueabi-g++ -g -o jmp_sp jmp_sp.cpp -static
arm-linux-gnueabi-strip jmp_sp
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
int
main
(
int
argc
,
char
**
argv
)
{
#if defined(__amd64__) || defined(__x86_64__)
printf
(
"x86_64 sizeof(long int)=%d, sizeof(long)=%d, sizeof(int)=%d
\n
"
,
(
int
)
sizeof
(
long
int
),
(
int
)
sizeof
(
long
),
(
int
)
sizeof
(
int
));
#else
printf
(
"arm sizeof(long int)=%d, sizeof(long)=%d, sizeof(int)=%d
\n
"
,
(
int
)
sizeof
(
long
int
),
(
int
)
sizeof
(
long
),
(
int
)
sizeof
(
int
));
#endif
jmp_buf
env
;
int
ret
=
setjmp
(
env
);
printf
(
"setjmp func1 ret=%d
\n
"
,
ret
);
#if defined(__amd64__) || defined(__x86_64__)
// typedef lint64_t __jmp_buf[8];
printf
(
"after setjmp: "
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
printf
(
"env[%d]=%#x, "
,
i
,
(
int
)
env
[
0
].
__jmpbuf
[
i
]);
}
printf
(
"
\n
"
);
#else
// typedef int32_t __jmp_buf[64] __attribute__((__aligned__ (8)));
printf
(
"after setjmp: "
);
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
printf
(
"env[%d]=%#x, "
,
i
,
(
int
)
env
[
0
].
__jmpbuf
[
i
]);
}
printf
(
"
\n
"
);
#endif
return
0
;
}
...
...
trunk/research/arm/test.cpp
0 → 100644
查看文件 @
7744053
/*
arm-linux-gnueabi-g++ -o test test.cpp -static
arm-linux-gnueabi-strip test
*/
#include <stdio.h>
int
main
(
int
argc
,
char
**
argv
)
{
printf
(
"hello, arm!
\n
"
);
return
0
;
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
7744053
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "1
5
"
#define VERSION_REVISION "1
6
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"
...
...
请
注册
或
登录
后发表评论