annotate gsm-fw/gpf/osl/os_sem_ir.c @ 451:578ba9dfc369

os_sem_ir.c: os_ReleaseSemaphore() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 23 Jun 2014 02:58:34 +0000
parents 8768b9f28073
children d461c532c76d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
450
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This C module is a reconstruction based on the disassembly of
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * os_sem.obj in frame_na7_db_ir.lib from the Leonardo package.
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 */
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* set of included headers from COFF symtab: */
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stdio.h>
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <string.h>
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include "gpfconf.h" /* FreeCalypso addition */
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "../../nucleus/nucleus.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "typedefs.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "os.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "gdi.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 #include "os_types.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #include "os_glob.h"
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 extern T_OS_SEM_TABLE_ENTRY SemTable[];
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 extern unsigned os_time_to_tick_multiplier;
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 int
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 ReleaseSemaphoreCB(NU_SEMAPHORE *SemCB)
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 {
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 if (NU_Release_Semaphore(SemCB) == NU_SUCCESS)
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 return(OS_OK);
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 else
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 return(OS_ERROR);
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 }
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
451
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
29 GLOBAL LONG
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
30 os_ReleaseSemaphore(OS_HANDLE TaskHandle, OS_HANDLE SemHandle)
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
31 {
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
32 if (NU_Release_Semaphore(&SemTable[SemHandle].SemCB) == NU_SUCCESS)
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
33 return(OS_OK);
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
34 else
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
35 return(OS_ERROR);
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
36 }
578ba9dfc369 os_sem_ir.c: os_ReleaseSemaphore() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 450
diff changeset
37
450
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 int
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 ObtainSemaphoreCB(NU_SEMAPHORE *SemCB, ULONG Timeout, USHORT wait_check)
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 {
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42
8768b9f28073 OSL: os_sem_ir.c started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 }