Merged several object files together - there are now posix_xxx.o and
kernel_posix_xxx.o, where xxx stands for stdio/stdlib/unistd/... sleep.c and usleep.c no longer reference sys_() calls directly, but call the OS functions instead (snooze_until(), and system_time()). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1839 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot os ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject os_main.o :
|
||||
<$(SOURCE_GRIST)>area.c
|
||||
<$(SOURCE_GRIST)>debug.c
|
||||
<$(SOURCE_GRIST)>fs_attr.c
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
SubDir OBOS_TOP src kernel libroot os arch x86 ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject os_arch_$(OBOS_ARCH).o :
|
||||
<$(SOURCE_GRIST)>atomic.S
|
||||
<$(SOURCE_GRIST)>cpuid.S
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_os_arch_$(OBOS_ARCH).o :
|
||||
# ToDo: remove atomic_xxx() functions from the kernel's libx86.a
|
||||
#<$(SOURCE_GRIST)>atomic.o
|
||||
<$(SOURCE_GRIST)>cpuid.o
|
||||
;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_main.o :
|
||||
<$(SOURCE_GRIST)>dlfcn.c
|
||||
<$(SOURCE_GRIST)>errno.c
|
||||
<$(SOURCE_GRIST)>fnmatch.c
|
||||
@@ -12,6 +12,11 @@ KernelObjects
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_posix_main.o :
|
||||
<$(SOURCE_GRIST)>errno.o
|
||||
<$(SOURCE_GRIST)>poll.o
|
||||
;
|
||||
|
||||
SubInclude OBOS_TOP src kernel libroot posix malloc ;
|
||||
SubInclude OBOS_TOP src kernel libroot posix locale ;
|
||||
SubInclude OBOS_TOP src kernel libroot posix stdio ;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix locale ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_locale.o :
|
||||
<$(SOURCE_GRIST)>ctype.c
|
||||
<$(SOURCE_GRIST)>localeconv.c
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_posix_locale.o :
|
||||
<$(SOURCE_GRIST)>ctype.o
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix malloc ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_malloc.o :
|
||||
<$(SOURCE_GRIST)>arch-specific.cpp
|
||||
<$(SOURCE_GRIST)>heap.cpp
|
||||
<$(SOURCE_GRIST)>processheap.cpp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix math ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_math.o :
|
||||
<$(SOURCE_GRIST)>acosh.c
|
||||
<$(SOURCE_GRIST)>asincos.c
|
||||
<$(SOURCE_GRIST)>asinh.c
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix math arch x86 ;
|
||||
|
||||
KernelObjects fabs.S frexp.c isinf.c ldexp.c ;
|
||||
KernelMergeObject posix_math_arch_$(OBOS_ARCH).o :
|
||||
<$(SOURCE_GRIST)>fabs.S
|
||||
<$(SOURCE_GRIST)>frexp.c
|
||||
<$(SOURCE_GRIST)>isinf.c
|
||||
<$(SOURCE_GRIST)>ldexp.c
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix stdio ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_stdio.o :
|
||||
<$(SOURCE_GRIST)>fclose.c
|
||||
<$(SOURCE_GRIST)>feof.c
|
||||
<$(SOURCE_GRIST)>fflush.c
|
||||
@@ -23,7 +23,6 @@ KernelObjects
|
||||
<$(SOURCE_GRIST)>getchar.c
|
||||
<$(SOURCE_GRIST)>gets.c
|
||||
<$(SOURCE_GRIST)>getw.c
|
||||
<$(SOURCE_GRIST)>kvsprintf.c
|
||||
<$(SOURCE_GRIST)>makebuf.c
|
||||
<$(SOURCE_GRIST)>printf.c
|
||||
<$(SOURCE_GRIST)>putc.c
|
||||
@@ -46,3 +45,10 @@ KernelObjects
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
KernelMergeObject kernel_posix_stdio.o :
|
||||
<$(SOURCE_GRIST)>kvsprintf.c
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix stdlib ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_stdlib.o :
|
||||
<$(SOURCE_GRIST)>abs.c
|
||||
<$(SOURCE_GRIST)>assert.c
|
||||
<$(SOURCE_GRIST)>atof.c
|
||||
@@ -25,3 +25,21 @@ KernelObjects
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_posix_stdlib.o :
|
||||
<$(SOURCE_GRIST)>abs.o
|
||||
<$(SOURCE_GRIST)>assert.o
|
||||
<$(SOURCE_GRIST)>atoi.o
|
||||
<$(SOURCE_GRIST)>bsearch.o
|
||||
<$(SOURCE_GRIST)>merge.o
|
||||
<$(SOURCE_GRIST)>qsort.o
|
||||
<$(SOURCE_GRIST)>rand.o
|
||||
<$(SOURCE_GRIST)>random.o
|
||||
<$(SOURCE_GRIST)>strtol.o
|
||||
<$(SOURCE_GRIST)>strtoll.o
|
||||
<$(SOURCE_GRIST)>strtoul.o
|
||||
<$(SOURCE_GRIST)>strtoull.o
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix string ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_string.o :
|
||||
<$(SOURCE_GRIST)>memchr.c
|
||||
<$(SOURCE_GRIST)>memcmp.c
|
||||
<$(SOURCE_GRIST)>memcpy.c
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix sys ;
|
||||
|
||||
KernelObjects
|
||||
KernelMergeObject posix_sys.o :
|
||||
<$(SOURCE_GRIST)>chmod.c
|
||||
<$(SOURCE_GRIST)>stat.c
|
||||
<$(SOURCE_GRIST)>mkdir.c
|
||||
@@ -9,3 +9,10 @@ KernelObjects
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_posix_sys.o :
|
||||
<$(SOURCE_GRIST)>chmod.o
|
||||
<$(SOURCE_GRIST)>stat.o
|
||||
<$(SOURCE_GRIST)>mkdir.o
|
||||
<$(SOURCE_GRIST)>select.o
|
||||
;
|
||||
|
||||
@@ -1,26 +1,48 @@
|
||||
SubDir OBOS_TOP src kernel libroot posix unistd ;
|
||||
|
||||
KernelObjects
|
||||
<$(SOURCE_GRIST)>access.c
|
||||
<$(SOURCE_GRIST)>chown.c
|
||||
<$(SOURCE_GRIST)>close.c
|
||||
KernelMergeObject posix_unistd.o :
|
||||
<$(SOURCE_GRIST)>access.c
|
||||
<$(SOURCE_GRIST)>chown.c
|
||||
<$(SOURCE_GRIST)>close.c
|
||||
<$(SOURCE_GRIST)>conf.c
|
||||
<$(SOURCE_GRIST)>directory.c
|
||||
<$(SOURCE_GRIST)>dup.c
|
||||
<$(SOURCE_GRIST)>dup2.c
|
||||
<$(SOURCE_GRIST)>dup.c
|
||||
<$(SOURCE_GRIST)>dup2.c
|
||||
<$(SOURCE_GRIST)>getopt.c
|
||||
<$(SOURCE_GRIST)>hostname.c
|
||||
<$(SOURCE_GRIST)>ioctl.c
|
||||
<$(SOURCE_GRIST)>link.c
|
||||
<$(SOURCE_GRIST)>lseek.c
|
||||
<$(SOURCE_GRIST)>lseek.c
|
||||
<$(SOURCE_GRIST)>mount.c
|
||||
<$(SOURCE_GRIST)>open.c
|
||||
<$(SOURCE_GRIST)>read.c
|
||||
<$(SOURCE_GRIST)>sleep.c
|
||||
<$(SOURCE_GRIST)>truncate.c
|
||||
<$(SOURCE_GRIST)>read.c
|
||||
<$(SOURCE_GRIST)>sleep.c
|
||||
<$(SOURCE_GRIST)>truncate.c
|
||||
<$(SOURCE_GRIST)>usergroup.c
|
||||
<$(SOURCE_GRIST)>usleep.c
|
||||
<$(SOURCE_GRIST)>usleep.c
|
||||
<$(SOURCE_GRIST)>write.c
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
||||
MergeObjectFromObjects kernel_posix_unistd.o :
|
||||
<$(SOURCE_GRIST)>access.o
|
||||
<$(SOURCE_GRIST)>chown.o
|
||||
<$(SOURCE_GRIST)>close.o
|
||||
<$(SOURCE_GRIST)>conf.o
|
||||
<$(SOURCE_GRIST)>directory.o
|
||||
<$(SOURCE_GRIST)>dup.o
|
||||
<$(SOURCE_GRIST)>dup2.o
|
||||
<$(SOURCE_GRIST)>hostname.o
|
||||
<$(SOURCE_GRIST)>ioctl.o
|
||||
<$(SOURCE_GRIST)>link.o
|
||||
<$(SOURCE_GRIST)>lseek.o
|
||||
<$(SOURCE_GRIST)>mount.o
|
||||
<$(SOURCE_GRIST)>open.o
|
||||
<$(SOURCE_GRIST)>read.o
|
||||
# <$(SOURCE_GRIST)>sleep.o
|
||||
<$(SOURCE_GRIST)>truncate.o
|
||||
<$(SOURCE_GRIST)>usergroup.o
|
||||
# <$(SOURCE_GRIST)>usleep.o
|
||||
<$(SOURCE_GRIST)>write.o
|
||||
;
|
||||
|
||||
@@ -13,19 +13,15 @@ sleep(unsigned seconds)
|
||||
bigtime_t usecs;
|
||||
bigtime_t start;
|
||||
int err;
|
||||
unsigned retval;
|
||||
|
||||
start= sys_system_time();
|
||||
start = system_time();
|
||||
|
||||
usecs= 1000000;
|
||||
usecs*= (bigtime_t) seconds;
|
||||
usecs = 1000000;
|
||||
usecs *= (bigtime_t) seconds;
|
||||
|
||||
err= sys_snooze_until(start + usecs, B_SYSTEM_TIMEBASE);
|
||||
err = snooze_until(start + usecs, B_SYSTEM_TIMEBASE);
|
||||
if (err)
|
||||
return (unsigned)(system_time() - start);
|
||||
|
||||
retval= 0;
|
||||
if(err) {
|
||||
retval= (unsigned)(sys_system_time()-start);
|
||||
}
|
||||
|
||||
return retval;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
int
|
||||
usleep(unsigned useconds)
|
||||
{
|
||||
return sys_snooze_until(sys_system_time() + (bigtime_t)(useconds), B_SYSTEM_TIMEBASE);
|
||||
return snooze_until(system_time() + (bigtime_t)(useconds), B_SYSTEM_TIMEBASE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user