view gsm-fw/gpf/osx/osx.c @ 495:34303faf4620

osx.c: int_osx_free_prim() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 01 Jul 2014 07:11:40 +0000
parents a8799459110c
children 2c16b554d142
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);
}

void
int_osx_free_prim(int caller, xSignalHeaderRec *prim_ptr)
{
	vsi_c_free(caller, (T_VOID_STRUCT **) &prim_ptr FILE_LINE_MACRO);
}