Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
f9b836d2
Verified
Commit
f9b836d2
authored
6 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Add more pte functions
parent
90bf583d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/platform/redox/pte.rs
+15
-0
15 additions, 0 deletions
src/platform/redox/pte.rs
src/start.rs
+3
-1
3 additions, 1 deletion
src/start.rs
with
18 additions
and
1 deletion
src/platform/redox/pte.rs
+
15
−
0
View file @
f9b836d2
...
...
@@ -135,8 +135,17 @@ pub unsafe extern "C" fn pte_osThreadWaitForEnd(handle: pte_osThreadHandle) -> p
}
// pte_osResult pte_osThreadCancel(pte_osThreadHandle threadHandle)
#[no_mangle]
pub
unsafe
extern
"C"
fn
pte_osThreadCancel
(
handle
:
pte_osThreadHandle
)
->
pte_osResult
{
//TODO: allow cancel of thread
PTE_OS_OK
}
// pte_osResult pte_osThreadCheckCancel(pte_osThreadHandle threadHandle)
#[no_mangle]
pub
unsafe
extern
"C"
fn
pte_osThreadCheckCancel
(
handle
:
pte_osThreadHandle
)
->
pte_osResult
{
PTE_OS_OK
}
//void pte_osThreadSleep(unsigned int msecs)
#[no_mangle]
...
...
@@ -288,6 +297,12 @@ pub unsafe extern "C" fn pte_osSemaphorePend(handle: pte_osSemaphoreHandle, pTim
PTE_OS_OK
}
#[no_mangle]
pub
unsafe
extern
"C"
fn
pte_osSemaphoreCancellablePend
(
handle
:
pte_osSemaphoreHandle
,
pTimeout
:
*
mut
c_uint
)
->
pte_osResult
{
//TODO
pte_osSemaphorePend
(
handle
,
pTimeout
)
}
/*
int pte_osAtomicExchange(int *ptarg, int val)
int pte_osAtomicCompareExchange(int *pdest, int exchange, int comp)
...
...
This diff is collapsed.
Click to expand it.
src/start.rs
+
3
−
1
View file @
f9b836d2
...
...
@@ -57,12 +57,13 @@ pub unsafe extern "C" fn relibc_start(sp: &'static Stack) -> ! {
fn
main
(
argc
:
isize
,
argv
:
*
mut
*
mut
c_char
,
envp
:
*
mut
*
mut
c_char
)
->
c_int
;
}
// Set up argc and argv
let
argc
=
sp
.argc
();
let
argv
=
sp
.argv
();
platform
::
inner_argv
=
copy_string_array
(
argv
,
argc
as
usize
);
platform
::
argv
=
platform
::
inner_argv
.as_mut_ptr
();
// Set up envp
let
envp
=
sp
.envp
();
let
mut
len
=
0
;
while
!
(
*
envp
.add
(
len
))
.is_null
()
{
...
...
@@ -76,6 +77,7 @@ pub unsafe extern "C" fn relibc_start(sp: &'static Stack) -> ! {
stdio
::
stdout
=
stdio
::
default_stdout
.get
();
stdio
::
stderr
=
stdio
::
default_stderr
.get
();
// Call init section
_init
();
// Look for the neighbor functions in memory until the end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment