-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/backport-auto-nvdrive-3841-W518-004' into '3841-W…
…518-004' Backport auto-nvdrive source profile changes to 3841-W518-004 See merge request eng/toolchain/bb-runtimes!143
- Loading branch information
Showing
7 changed files
with
168 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef _GNU_SOURCE | ||
#define _GNU_SOURCE | ||
#endif | ||
#include <sys/syscall.h> | ||
#include <unistd.h> | ||
#include <sched.h> | ||
|
||
void * | ||
__gnat_lwp_self (void) | ||
{ | ||
return (void *) syscall (__NR_gettid); | ||
} | ||
|
||
cpu_set_t * | ||
__gnat_cpu_alloc (size_t count) | ||
{ | ||
return CPU_ALLOC (count); | ||
} | ||
|
||
size_t | ||
__gnat_cpu_alloc_size (size_t count) | ||
{ | ||
return CPU_ALLOC_SIZE (count); | ||
} | ||
|
||
void | ||
__gnat_cpu_free (cpu_set_t *set) | ||
{ | ||
CPU_FREE (set); | ||
} | ||
|
||
void | ||
__gnat_cpu_zero (size_t count, cpu_set_t *set) | ||
{ | ||
CPU_ZERO_S (count, set); | ||
} | ||
|
||
void | ||
__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set) | ||
{ | ||
/* Ada handles CPU numbers starting from 1, while C identifies the first | ||
CPU by a 0, so we need to adjust. */ | ||
CPU_SET_S (cpu - 1, count, set); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from support.bsp_sources.target import DFBBTarget | ||
|
||
|
||
class Windows(DFBBTarget): | ||
def __init__(self): | ||
super().__init__() | ||
self.add_gnat_sources("src/s-macres__native.adb", "src/s-textio__stdio.adb") | ||
|
||
@property | ||
def name(self): | ||
return self.target | ||
|
||
def has_libc(self, profile): | ||
return True | ||
|
||
def dump_runtime_xml(self, rts_name, rts): | ||
return ( | ||
'<?xml version="1.0" ?>\n' | ||
"<gprconfig>\n" | ||
" <configuration>\n" | ||
" </configuration>\n" | ||
"</gprconfig>\n" | ||
) | ||
|
||
@property | ||
def is_legacy_format(self): | ||
return True | ||
|
||
|
||
class X86Windows(Windows): | ||
@property | ||
def target(self): | ||
return "x86-windows" | ||
|
||
@property | ||
def system_ads(self): | ||
return {"light": "system-native-x86-light.ads"} | ||
|
||
|
||
class X8664Windows(Windows): | ||
@property | ||
def target(self): | ||
return "x86_64-windows" | ||
|
||
@property | ||
def is_64bit(self): | ||
return True | ||
|
||
@property | ||
def system_ads(self): | ||
return {"light": "system-native-x86-light.ads"} |