static void setup_rt_frame(int usig, struct emulated_sigaction *ka, 

                           target_siginfo_t *info,

			   target_sigset_t *set, CPUState *env)

{

	struct rt_sigframe *frame = get_sigframe(ka, env, sizeof(*frame));

	int err = 0;



#if 0

	if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))

            return 1;

#endif

	__put_user_error(&frame->info, (target_ulong *)&frame->pinfo, err);

	__put_user_error(&frame->uc, (target_ulong *)&frame->puc, err);

	err |= copy_siginfo_to_user(&frame->info, info);



	/* Clear all the bits of the ucontext we don't use.  */

	err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));



	err |= setup_sigcontext(&frame->uc.uc_mcontext, /*&frame->fpstate,*/

				env, set->sig[0]);

	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));



	if (err == 0)

		err = setup_return(env, ka, &frame->retcode, frame, usig);



	if (err == 0) {

		/*

		 * For realtime signals we must also set the second and third

		 * arguments for the signal handler.

		 *   -- Peter Maydell <pmaydell@chiark.greenend.org.uk> 2000-12-06

		 */

            env->regs[1] = (target_ulong)frame->pinfo;

            env->regs[2] = (target_ulong)frame->puc;

	}



        //	return err;

}

static void setup_rt_frame(int usig, struct emulated_sigaction *ka, 

                           target_siginfo_t *info,

			   target_sigset_t *set, CPUState *env)

{

	struct rt_sigframe *frame = get_sigframe(ka, env, sizeof(*frame));

	int err = 0;



#if 0

	if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))

            return 1;

#endif

	__put_user_error(&frame->info, (target_ulong *)&frame->pinfo, err);

	__put_user_error(&frame->uc, (target_ulong *)&frame->puc, err);

	err |= copy_siginfo_to_user(&frame->info, info);



	

	err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));



	err |= setup_sigcontext(&frame->uc.uc_mcontext, 

				env, set->sig[0]);

	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));



	if (err == 0)

		err = setup_return(env, ka, &frame->retcode, frame, usig);



	if (err == 0) {

		









            env->regs[1] = (target_ulong)frame->pinfo;

            env->regs[2] = (target_ulong)frame->puc;

	}



        

}

static void FUNC_0(int VAR_0, struct emulated_sigaction *VAR_1, 

                           target_siginfo_t *VAR_2,

			   target_sigset_t *VAR_3, CPUState *VAR_4)

{

	struct rt_sigframe *VAR_5 = get_sigframe(VAR_1, VAR_4, sizeof(*VAR_5));

	int VAR_6 = 0;



#if 0

	if (!access_ok(VERIFY_WRITE, VAR_5, sizeof (*VAR_5)))

            return 1;

#endif

	__put_user_error(&VAR_5->VAR_2, (target_ulong *)&VAR_5->pinfo, VAR_6);

	__put_user_error(&VAR_5->uc, (target_ulong *)&VAR_5->puc, VAR_6);

	VAR_6 |= copy_siginfo_to_user(&VAR_5->VAR_2, VAR_2);



	

	VAR_6 |= __clear_user(&VAR_5->uc, offsetof(struct ucontext, uc_mcontext));



	VAR_6 |= setup_sigcontext(&VAR_5->uc.uc_mcontext, 

				VAR_4, VAR_3->sig[0]);

	VAR_6 |= __copy_to_user(&VAR_5->uc.uc_sigmask, VAR_3, sizeof(*VAR_3));



	if (VAR_6 == 0)

		VAR_6 = setup_return(VAR_4, VAR_1, &VAR_5->retcode, VAR_5, VAR_0);



	if (VAR_6 == 0) {

		









            VAR_4->regs[1] = (target_ulong)VAR_5->pinfo;

            VAR_4->regs[2] = (target_ulong)VAR_5->puc;

	}



        

}

static void FUNC_0(int VAR_0, struct emulated_sigaction *VAR_1,
target_siginfo_t *VAR_2,
target_sigset_t *VAR_3, CPUState *VAR_4)
{ struct rt_sigframe *VAR_5 = get_sigframe(VAR_1, VAR_4, sizeof(*VAR_5)); int VAR_6 = 0; #if 0
if (!access_ok(VERIFY_WRITE, VAR_5, sizeof (*VAR_5)))
return 1; #endif
__put_user_error(&VAR_5->VAR_2, (target_ulong *)&VAR_5->pinfo, VAR_6); __put_user_error(&VAR_5->uc, (target_ulong *)&VAR_5->puc, VAR_6); VAR_6 |= copy_siginfo_to_user(&VAR_5->VAR_2, VAR_2); VAR_6 |= __clear_user(&VAR_5->uc, offsetof(struct ucontext, uc_mcontext)); VAR_6 |= setup_sigcontext(&VAR_5->uc.uc_mcontext,
VAR_4, VAR_3->sig[0]); VAR_6 |= __copy_to_user(&VAR_5->uc.uc_sigmask, VAR_3, sizeof(*VAR_3)); if (VAR_6 == 0)
VAR_6 = setup_return(VAR_4, VAR_1, &VAR_5->retcode, VAR_5, VAR_0); if (VAR_6 == 0) { VAR_4->regs[1] = (target_ulong)VAR_5->pinfo; VAR_4->regs[2] = (target_ulong)VAR_5->puc; } }