资源简介
qpxcx_www.zccode.com.7z
代码片段和文件信息
/*
* This file was taken from pth-1.40/aclocal.m4
* The original copyright is below.
*
* GNU Pth - The GNU Portable Threads
* Copyright (c) 1999-2001 Ralf S. Engelschall
*
* This file is part of GNU Pth a non-preemptive thread scheduling
* library which can be found at http://www.gnu.org/software/pth/.
*
* This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; if not write to the Free Software
* Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307
* USA or contact Marc Lehmann .
*/
#include
#include
#include
#if defined(TEST_sigstack) || defined(TEST_sigaltstack)
#include
#include
#include
#endif
#if defined(TEST_makecontext)
#include
#endif
union alltypes {
long l;
double d;
void *vp;
void (*fp)(void);
char *cp;
};
static volatile char *handler_addr = (char *)0xDEAD;
#if defined(TEST_sigstack) || defined(TEST_sigaltstack)
static volatile int handler_done = 0;
void handler(int sig)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = ‘X‘;
handler_addr = (char *)&dummy;
handler_done = 1;
return;
}
#endif
#if defined(TEST_makecontext)
static ucontext_t uc_handler;
static ucontext_t uc_main;
void handler(void)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = ‘X‘;
handler_addr = (char *)&dummy;
swapcontext(&uc_handler &uc_main);
return;
}
#endif
int main(int argc char *argv[])
{
FILE *f;
char *skaddr;
char *skbuf;
int sksize;
char result[1024];
int i;
sksize = 32768;
skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
if (skbuf == NULL)
exit(1);
for (i = 0; i < sksize*2+2*sizeof(union alltypes); i++)
skbuf[i] = ‘A‘;
skaddr = skbuf+sizeof(union alltypes);
#if defined(TEST_sigstack) || defined(TEST_sigaltstack)
{
struct sigaction sa;
#if defined(TEST_sigstack)
struct sigstack ss;
#elif defined(TEST_sigaltstack) && defined(HAVE_STACK_T)
stack_t ss;
#else
struct sigaltstack ss;
#endif
#if defined(TEST_sigstack)
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_onstack = 0;
if (sigstack(&ss NULL) < 0)
exit(1);
#elif defined(TEST_sigaltstack)
相关资源
- 数据思维:从数据分析到商业价值.
- (李广军).pdf
- edraw.max.9.4破解补丁.zip
- hongweisong666_11148550.7
- txcouldrz.zip
- 嵌入式操作系统基础μCOS-2和Linux第二
- 多开分身.rar
- 英汉互译软件
- 2ayd1l.rar
- zw_mAppWigetDemo.zip
- cfv3246_10385571.zip
- videoInput.rar
- 自动分割地块.zip
- GriffithsD.J.-Introductiontoquantummechanics.p
- 数字电子技术基础(第六版)学习辅
- 虚拟化与云计算.zip
-
JavPla
yer_108.zip - 《电力电子电机控制系统仿真技术》
- 知乎答题王.zip
- 新建WinRARZIP压缩文件.zip
- MathType-a5.zip
- swift进阶objc中国swift4epubpdfmobi三种格式
- 高频开关变换器的数字控制.pdf
- 协同会议软件.zip
- pw18EduEvalSetup.exe
- 软件-大学教务管理系统.rar
- Morehotair笑谈热设计_[美科迪班_著]_2
- 计算机视觉算法与应用中文版.pdf
- 生财日历2020完整版-生财有术出品.p
- LabVIEW2012中文版虚拟仪器从入门到精通
评论
共有 条评论