mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Improve ix86 and x86_64 data types ABI.
Increase gid_t to an unsigned 64-bit integer. Increase id_t to an unsigned 64-bit integer. Increase pid_t to a signed 64-bit integer. Increase time_t to a signed 64-bit integer. Increase uid_t to an unsigned 64-bit integer. Note: This is an incompatible ABI change.
This commit is contained in:
parent
2cc95737c3
commit
0117c4fbc7
4 changed files with 11 additions and 12 deletions
|
@ -177,7 +177,6 @@ int Descriptor::chmod(ioctx_t* ctx, mode_t mode)
|
|||
|
||||
int Descriptor::chown(ioctx_t* ctx, uid_t owner, gid_t group)
|
||||
{
|
||||
if ( owner < 0 || group < 0 ) { errno = EINVAL; return -1; }
|
||||
return vnode->chown(ctx, owner, group);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef __uintptr_t __dev_t;
|
|||
|
||||
/* TODO: __fsblksize_t */
|
||||
|
||||
typedef int __gid_t;
|
||||
typedef __uint64_t __gid_t;
|
||||
|
||||
typedef int __id_t;
|
||||
typedef __uint64_t __id_t;
|
||||
|
||||
typedef __uintmax_t __ino_t;
|
||||
|
||||
|
@ -62,7 +62,7 @@ typedef __intmax_t __off_t;
|
|||
#define __OFF_MIN __INTMAX_MIN
|
||||
#define __OFF_MAX __INTMAX_MAX
|
||||
|
||||
typedef int __pid_t;
|
||||
typedef __intptr_t __pid_t;
|
||||
|
||||
/* TODO: __size_t */
|
||||
|
||||
|
@ -72,13 +72,13 @@ typedef __SSIZE_TYPE__ __ssize_t;
|
|||
|
||||
typedef long __suseconds_t;
|
||||
|
||||
typedef long __time_t;
|
||||
typedef __int64_t __time_t;
|
||||
|
||||
typedef __uintptr_t __timer_t;
|
||||
|
||||
/* TODO: trace*_t */
|
||||
|
||||
typedef int __uid_t;
|
||||
typedef __uint64_t __uid_t;
|
||||
|
||||
typedef unsigned int __useconds_t;
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ __call_tfork_with_regs:
|
|||
pushq %rcx
|
||||
pushq %rbx
|
||||
pushq $0 # rax, result of sfork is 0 for the child.
|
||||
pushq $after_fork # rip, child will start execution from here.
|
||||
pushq $.Lafter_fork # rip, child will start execution from here.
|
||||
|
||||
# Call tfork with a nice pointer to our structure. Note that %rdi contains
|
||||
# the flag parameter that this function accepted.
|
||||
movq %rsp, %rsi
|
||||
call tfork
|
||||
|
||||
after_fork:
|
||||
.Lafter_fork:
|
||||
# The value in %rax determines whether we are child or parent. There is no
|
||||
# need to clean up the stack from the above pushes, leaveq sets %rsp to %rbp
|
||||
# which does that for us.
|
||||
|
|
|
@ -44,8 +44,8 @@ __call_tfork_with_regs:
|
|||
pushl %edx
|
||||
pushl %ecx
|
||||
pushl %ebx
|
||||
pushl $0 # rax, result of sfork is 0 for the child.
|
||||
pushl $after_fork # rip, child will start execution from here.
|
||||
pushl $0 # eax, result of sfork (0 for the child).
|
||||
pushl $.Lafter_fork # rip, child will start execution from here.
|
||||
|
||||
# Call tfork with a nice pointer to our structure. Note that %edi contains
|
||||
# the flag parameter that this function accepted.
|
||||
|
@ -53,8 +53,8 @@ __call_tfork_with_regs:
|
|||
pushl %edx
|
||||
call tfork
|
||||
|
||||
after_fork:
|
||||
# The value in %eax determines whether we are child or parent. There is no
|
||||
.Lafter_fork:
|
||||
# The value in %eax: determines whether we are child or parent. There is no
|
||||
# need to clean up the stack from the above pushes, leavel sets %esp to %ebp
|
||||
# which does that for us.
|
||||
leavel
|
||||
|
|
Loading…
Reference in a new issue