view gsm-fw/gpf/osx/osx.c @ 494:a8799459110c

osx.c: osx_send_sig() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 01 Jul 2014 07:01:27 +0000
parents 4775ba17ba05
children 34303faf4620
line wrap: on
line source

/*
 * This C module is a reconstruction based on the disassembly of
 * osx.obj in osx_na7_db.lib from the Leonardo package.
 */

/* reconstructed set of included headers from COFF symtab: */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "typedefs.h"
#include "vsi.h"
#include "cust_os.h"

int osx_config = 2;
int _caller;
T_OSX_REGISTER _osx_registry[7];

void
int_osx_send_sig(int caller, unsigned long opc, void *signal_ptr,
		 int queue_handle)
{
	T_QMSG Message;
	int status;

	TRACE_ASSERT(queue_handle != 0);
	Message.MsgType = MSG_SIGNAL;
	Message.Msg.Signal.SigOPC = opc;
	Message.Msg.Signal.SigBuffer = signal_ptr;
	Message.Msg.Signal.SigLen = sizeof(xSignalHeaderRec);
	status = vsi_c_send(caller, queue_handle, &Message FILE_LINE_MACRO);
	TRACE_ASSERT(status == VSI_OK);
}

void
osx_send_sig(unsigned long opc, void *signal_ptr, T_ENUM_OS_QUEUE queue_type)
{
	int caller, queue_handle;

	caller = _osx_registry[queue_type].caller;
	queue_handle = _osx_registry[queue_type].queue_handle;
	TRACE_ASSERT(queue_handle != 0);
	int_osx_send_sig(caller, opc, signal_ptr, queue_handle);
}