Commit Graph

2400 Commits

Author SHA1 Message Date
Michael Pfeiffer
0f36fca33f Enabled pattern support.
Fixed bug in detection of destination of local link!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 16:36:00 +00:00
Michael Pfeiffer
cdef53218c Enabled pattern support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 16:35:09 +00:00
Michael Pfeiffer
d5962f0991 Removed out commented debug information.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 16:34:46 +00:00
Michael Pfeiffer
1a0af2e086 Added "Title" to default keys.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 16:34:15 +00:00
Axel Dörfler
f9afe354bf Added some calls to find_thread(NULL) which does now work as expected
(as it uses TLS, have a look at OS.h).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:56:33 +00:00
Axel Dörfler
20726b7fb1 _create_thread() now correctly allocates the stack with REGION_ADDR_EXACT_ADDRESS
from the USER_STACK_REGION (until B_BASE_ADDRESS is available), made it much better
readable. It now grows from the lower USER_STACK_REGION up to the start of the main
thread's stack location.
Calls arch_thread_tls_init() and accounts for the TLS area in the stack region.
Added some comments, some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:48:01 +00:00
Axel Dörfler
59cbb92fdf team_create_team2() now also allocates a region for TLS in the primary stack
area. It now also calls arch_thread_init_tls(). Cleaned it up to make it more
readable, added some comments.
Some other cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:40:59 +00:00
Axel Dörfler
2a6fbb7f88 Removed some hard-coded values with definitions (mostly USER_x_SEG in arch_x86.S,
and TSS_BASE_SEGMENT in i386_set_tss_and_kstack() (thanks Daniel for pointing this
out)).
Added a arch_thread_init_tls() function which fills the reserved slots - the find_thread()
inline asm in OS.h is finally working.
Added some more comments, resolved the ToDo items from last time :-)
arch_thread_context_switch() now calls set_tls_context() at the correct location.
arch_thread_enter_uspace() now calls set_tls_context() as there is no context
switch in this case for the current thread after TLS has been set up, and it
now gets a pointer to the thread structure directly, and calculates the user
stack top itself, rather than the callee.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:33:30 +00:00
Axel Dörfler
074a16b53e Added a private tls.h file with definitions for the reserved TLS slots.
Renamed i386_set_kstack() to i386_set_tss_and_kstack(), because that's what
it does.
Added a new function arch_thread_init_tls() which must be called after
having allocated the TLS area.
Renamed arch_thread_initialize_kthread_stack() to arch_thread_init_kthread_stack()
to be more consistent.
Changed the parameters for arch_thread_enter_uspace() - it now gets a pointer
to the thread structure and takes the user stack pointer from there (which
might also be architectural different).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:17:31 +00:00
Axel Dörfler
1f6480576d Added new fields for the local storage of "errno" in the kernel and user-
level TLS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:13:36 +00:00
Axel Dörfler
20dde76256 I've added a MAIN_THREAD_STACK_SIZE definition, and put the corresponding
BeOS values commented beneath it.
For now MAIN_THREAD_STACK_SIZE is the same as STACK_SIZE.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:12:26 +00:00
Axel Dörfler
ccfdaba3e9 Moved the errnop() function to the new TLS stuff.
We now have a separate errnop() for the kernel, which just references
a field in the thread structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:08:44 +00:00
Axel Dörfler
2d6ab447f9 Moved arch-dependent stuff to the correct location, no more #if __INTEL__
anymore.
Adapted tls.c to honour the reserved slots.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:05:27 +00:00
Axel Dörfler
0464331f06 The main thread didn't wait for the other threads.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 09:01:51 +00:00
Axel Dörfler
3c2ec528f6 The return value is now also a variable of type (void **).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-07 00:20:52 +00:00
beveloper
0e21b167c9 time sources now publish and retrieve timing information
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 23:11:18 +00:00
beveloper
aac800c2d1 added SetTimeSourceFor
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 14:24:08 +00:00
beveloper
a99e278308 added cleanup of dead nodes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 14:23:20 +00:00
Axel Dörfler
f143877df9 _start() now uses set_segment_descriptor() to initialize the GDT instead of
the direct values.
Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:33:59 +00:00
Axel Dörfler
39c5004d20 Replaced the select_test application with tls_test in the boot image.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:31:26 +00:00
Axel Dörfler
a8687de4ad Added a _ASSEMBLER define in the assembler rule, so that we can differentiate
in a header if it was included from assembler or not (if anybody knows a better
way how to solve this, feel free to speak, I haven't found anything :).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:30:40 +00:00
Axel Dörfler
19321ae5a8 Temporarily removed arch_selector.c from the build - it's currently not used
at all, and assumes a fixed and wrong number of preallocated GDT entries.

Implemented TLS: there is one GDT entry per CPU. If a context switch happens,
the FS register of the new thread is set to the matching GDT, and the GDT is
changed so that it points to the current thread's TLS storage area.
This area currently resides unsafely at the bottom of the user stack - for
some reason I could not figure out, it doesn't even work correctly most of
the time (it segfaults when accessing a slot via FS). I've added a ToDo item
explaining the situation - hopefully I have more ideas when I slept a bit more...

The GDT is now no longer static in arch_cpu.c and has been renamed from gdt to
gGDT. It's now also referenced in arch_thread.c, and it would make sense for
arch_selector.c to use it as well (instead of another local copy).
arch_cpu_init2() now uses the set_tss_descriptor() inline function and the
TSS_BASE_SEGMENT macro to set up the TSS section. It now also sets up the
TLS segment descriptors (as TSS, one entry per CPU).

Since I removed desc_table from the headers (the GDT is now a (segment_descriptor *)),
I added it locally to arch_int.c.
i386_enter_uspace() now don't set the FS register to 0x23 anymore, since it's
now already set correctly at the end of arch_thread_context_switch().

Some clean-ups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:25:01 +00:00
Axel Dörfler
722bf47f67 Added some ToDo items.
Smaller cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:10:54 +00:00
Axel Dörfler
1d661e3285 Just slightly changed a comment; there was more, but I removed that, and
I was too lazy to revert that little change back, so that I would be able
to write this short paragraph explaining what I've done.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:10:03 +00:00
Axel Dörfler
d703e5451d Removed an XXX comment question, and replaced it with an explanation of the
issue.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:08:13 +00:00
Axel Dörfler
831e32af8c Userland part of the TLS implementation for x86.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:05:09 +00:00
Axel Dörfler
1f149d94c4 Added a simple TLS test app.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:04:21 +00:00
Axel Dörfler
7208e95f0e Moved the gdt_idt_descr struct from arch_stage2.h to stage2_priv.h.
Moved the tss_descriptor structure to descriptor.h, updated it to be a
segment_descriptor structure, and provided inlines for set_tss_descriptor(),
set_segment_descriptor(), set_segment_descriptor_base(), and
clear_segment_descriptor().
Also added defines for the different privilege levels and descriptor types.
Removed the unusused and incorrect TSS definition, introduced new
TSS_BASE_SEGMENT and TLS_BASE_SEGMENT macros.
Removed include of arch/cpu.h in arch_cpu.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:02:44 +00:00
Axel Dörfler
5c339b0237 Fixed some issues in TLS.h (i.e. the inline version of tls_address() accidently
returned a (void *) instead of a (void **)).
Added TLS_MAX_KEYS macro, and a comment.
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 07:57:10 +00:00
Michael Phipps
954674ddf8 Changes to mmap to make COPY and SHARED work correctly (I hope)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 04:49:58 +00:00
beveloper
de613a80e7 changes submitted by Christopher ML Zumwalt May
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 02:19:29 +00:00
beveloper
835140c89a better time source support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-05 23:35:07 +00:00
Matthew Wilber
1ab4cb426e Changed to use simple assignment in places where I used memcpy() to copy only 1 byte of data
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-05 18:41:46 +00:00
beveloper
a30d6966c0 use another number
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-03 01:57:42 +00:00
beveloper
287f7492c3 more time source function...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-03 01:51:22 +00:00
Axel Dörfler
50808915da Removed unused file int.c.
Minor style changes in arch_vm*.c


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:56:53 +00:00
Axel Dörfler
e8bfc82801 Removed config_manager from the old location (now in src/add-ons/kernel/bus_managers)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:23:06 +00:00
Axel Dörfler
538ee6189c Moved the config_manager to the correct location and added it to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:21:19 +00:00
Axel Dörfler
346646a2c7 Moved the files vm_types.h, syscalls.h, and vfs_types.h to the private
kernel header directory - they are by no means public includes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:16:35 +00:00
Stefano Ceccherini
7cf3b2f4b1 Documented the class, some small changes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:01:45 +00:00
Stefano Ceccherini
005069f4e1 Changed a "" include to a <> one. Some cosmetic changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 11:14:33 +00:00
Matthew Wilber
d390baeede added comments, made minor changes to error handling, changed a buffer type from char to uint8
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 02:31:49 +00:00
Phil Greenway
b91e07e73a Coded by Sikosis (beos@gravity24hr.com)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-01 13:13:14 +00:00
Phil Greenway
49faf11397 Coded by Larry Cow (migeot_o@epita.fr)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-01 13:12:11 +00:00
DarkWyrm
a92481e9ef Going to Doxygen documentation system for server docs
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 22:20:52 +00:00
DarkWyrm
8927dfb846 Updates to RGBColor and adding Doxygen documentation
Added foundation for font classes.
Still not in build (on purpose)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 22:19:48 +00:00
Axel Dörfler
c893786008 Exported the whole known driver module API - not implemented yet, though.
Removed the probably broken bus module info.
Renamed functions cfdm -> driver, cfbm -> bus.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 18:33:32 +00:00
DarkWyrm
7af0fd5b2e The server has begun...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 18:21:14 +00:00
Axel Dörfler
ea8ace93a1 The /dev/misc/config driver which provides userland access to the
Configuration Manager, once this is implemented.
Needed for the "listdev" command and the Devices preferences application.
Not tested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 16:19:09 +00:00
mahlzeit
53284a9fdb Checkin of the source code for midi2 kit milestone 1.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-31 14:34:17 +00:00