annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
491
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This C module is a reconstruction based on the disassembly of
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * osx.obj in osx_na7_db.lib from the Leonardo package.
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 */
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* reconstructed set of included headers from COFF symtab: */
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stdio.h>
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <stdlib.h>
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include <string.h>
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "typedefs.h"
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "vsi.h"
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "cust_os.h"
886cd11bc45f OSX reconstruction started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13
492
517cde3e238e osx.c: global data done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 491
diff changeset
14 int osx_config = 2;
517cde3e238e osx.c: global data done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 491
diff changeset
15 int _caller;
517cde3e238e osx.c: global data done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 491
diff changeset
16 T_OSX_REGISTER _osx_registry[7];
493
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
17
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
18 void
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
19 int_osx_send_sig(int caller, unsigned long opc, void *signal_ptr,
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
20 int queue_handle)
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
21 {
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
22 T_QMSG Message;
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
23 int status;
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
24
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
25 TRACE_ASSERT(queue_handle != 0);
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
26 Message.MsgType = MSG_SIGNAL;
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
27 Message.Msg.Signal.SigOPC = opc;
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
28 Message.Msg.Signal.SigBuffer = signal_ptr;
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
29 Message.Msg.Signal.SigLen = sizeof(xSignalHeaderRec);
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
30 status = vsi_c_send(caller, queue_handle, &Message FILE_LINE_MACRO);
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
31 TRACE_ASSERT(status == VSI_OK);
4775ba17ba05 osx.c: int_osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 492
diff changeset
32 }
494
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
33
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
34 void
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
35 osx_send_sig(unsigned long opc, void *signal_ptr, T_ENUM_OS_QUEUE queue_type)
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
36 {
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
37 int caller, queue_handle;
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
38
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
39 caller = _osx_registry[queue_type].caller;
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
40 queue_handle = _osx_registry[queue_type].queue_handle;
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
41 TRACE_ASSERT(queue_handle != 0);
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
42 int_osx_send_sig(caller, opc, signal_ptr, queue_handle);
a8799459110c osx.c: osx_send_sig() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 493
diff changeset
43 }