Commit Graph

6737 Commits

Author SHA1 Message Date
Alexander von Gluck IV 3f1eed704a kernel: x86 SSE improvements
* Prepend x86_ to non-static x86 code
* Add x86_init_fpu function to kernel header
* Don't init fpu multiple times on smp systems
* Verified fpu is still started on smp and non-smp
* SSE code still generates general protection faults
  on smp systems though
2012-02-15 12:33:45 -06:00
Oliver Tappe 752527a8fe Cleanup: correct variable name in mbrtowc() signature. 2012-02-07 21:43:00 +01:00
czeidler c7413cf90c Forgot this file. 2012-01-22 15:30:18 +13:00
czeidler 5dbc26dc0a Add AS_RECONNECT_BITMAP to the server protocol. 2012-01-22 15:30:17 +13:00
czeidler 6c40fc5dfc Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server
2012-01-22 15:30:16 +13:00
czeidler 40c34878fa Reconnect BPicture to the app_server.
* maintain a list of all BPictures to do so
* BView downloads the BPicture data after recording the picture. This could probably done more efficiently using shared memory in the first place.
2012-01-22 15:30:15 +13:00
czeidler 577f58763b Make it possible to reconnect BBitmap to the app_server.
* maintain a list of all BBitmaps
* refactor the client memory allocator class, its possible now to just clone existing client area
2012-01-22 15:30:15 +13:00
czeidler 04209cdd81 Catch a app_server crash in the debug server. Let the registrar restart the app_server and notify all apps. 2012-01-22 15:30:14 +13:00
Alexander von Gluck IV 8dd1e875c1 kernel: Fix FPU SSE + MMX instruction usage.
* Rename init_sse to init_fpu and handle FPU setup.
* Stop trying to set up FPU before VM init.
  We tried to set up the FPU before VM init, then
  set it up again after VM init with SSE extensions,
  this caused SSE and MMX applications to crash.
* Be more logical in FPU setup by detecting CPU flag prior
  to enabling FPU. (it's unlikely Haiku will run on
  a processor without a fpu... but lets be consistant)
* SSE2 gcc code now runs (faster even) without GPF
* tqh confirms his previously crashing mmx code now works
* The non-SSE FPU enable after VM init needs tested!
2012-01-20 15:06:01 -06:00
Alexander von Gluck IV 69001466e2 interface: Clean up public headers; No functional change.
* Whitespace / Tab cleanup
* Better document color space
* Let me know if anything looks wrong
2012-01-12 16:26:15 -06:00
Alexander von Gluck IV 77d663c3ea Remove the Haiku Mesa fork 2012-01-08 01:12:54 -06:00
Oliver Tappe b7417fbec1 Switch wchar from glibc to our own implementations. 2012-01-07 22:02:48 +01:00
Oliver Tappe bd55dcbefb Add our implementation for wcscoll() and wcsxfrm().
* add Wcscoll() and Wcsxfrm() ICU locale backend
* provide implementations of wcscoll() and wcsxfrm() that are using
  the respective methods of the locale backend
2012-01-07 21:47:31 +01:00
czeidler b5c5640ec0 Style fixes. Thanks Axel and Ingo. 2012-01-06 09:35:33 +13:00
czeidler 32951c4e63 Make BReference and BWeakReference behave more like a normal pointer.
* Casts like BReference<Derived> to BReference<Base> are now possible.
* This cast for BWeakReference is, because of the underlying structure, not automatically type safe. I used a simple hack to make the compiler complain if the cast
is not type safe. Please take a look if that can be done better.
* Smaller style and bug fixes.
2012-01-05 13:42:45 +13:00
Jérôme Duval 90b92dab5c added memrchr to string.h, guarded by __USE_GNU. Also guards strchrnul.
Original patch by Dario Casalinuovo.
BUG: Ticket #8265
2012-01-05 00:17:41 +01:00
John Scipione d4fa97f8f8 Moved documentation for the BEntry class into a dox file to include it into the Haiku book. 2011-12-18 21:28:55 -05:00
czeidler 14fc524be2 Style and performance fixes. Thanks Ingo and Stephan. 2011-12-17 14:36:36 +13:00
Alex Wilson a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
Oliver Tappe ec99f3b2a6 Adjust mbstate_t to embed the state of the ICU converter.
* make room in mbstate_t for containing an ICU-converter's state
  (well, in fact the whole converter object)
* adjust libroot's locale add-on to clone converters into a given
  mbstate_t directly
* adjust ICUThreadLocalStorageValue to contain the converter pointer
  instead of a converter-ID (if the converter is related to an
  mbstate_t, it points into the mbstate_t).
* adjust users of converters to directly use converter pointers
  instead of ICUConverterRef
* drop now unused ICUConverterManager and ICUConverterRef
* update gcc4 optional package

This brings our multibyte implementation into a fully working state,
both non-ascii and non-8-bit characters can now be handled normally
in the Terminal, i.e. this finally fixes #6276.

N.B.: Since the size of mbstate_t has changed, everything (including
the compiler!) needs to be rebuilt.
2011-12-15 13:18:11 +01:00
czeidler ed77847ca4 Remove private BStringList implementation from mail. Tested it but however please be careful an review. This fixes bug #8174. 2011-12-15 19:45:07 +13:00
czeidler 779061f0cd Make BStringList derive from BFlattenable. The implementation is more or less copied from the mail version to stay compatible. Fix IndexOf which
was the implementation of HasString.
2011-12-15 19:45:06 +13:00
Alexander von Gluck IV 249495e284 Add complete set of DRM DisplayPort defines into radeon_hd
* I'd rather this be common code, but I don't have access
  to the DisplayPort specifications. If I added it as common
  code I would want to be 100% it was complete and variables
  were named properly.
* For now putting in radeon_hd private headers
2011-12-14 10:19:00 -06:00
John Scipione 0e35d5d2e5 Change instances of wether in comments to whether. No functional change intended. 2011-12-12 14:41:49 -05:00
Oliver Tappe 995d6d827f Implement our own version of wcsrtombs().
* add WcharStringToMultibyte() to libroot's locale backend
* implement wcstombs(), wcsrtombs() and wcsnrtombs() on top of that
  new backend function
2011-12-12 17:27:42 +01:00
Oliver Tappe 73186b2fcd Add implementation of mbsrtowcs() to our locale backend.
* add MultibyteStringToWchar() to ICU locale backend
* implement mbsrtowcs() and mbsnrtowcs() on top of 
  MultibyteStringToWchar()
* drop respective glibc files
2011-12-12 17:27:41 +01:00
Oliver Tappe cfe553b378 Squash TODO: __STDC_ISO_10646__ is being defined now. 2011-12-12 17:27:41 +01:00
Jérôme Duval 86216323af Fixed math.h part of #2696
* added lgammal_r wrapper
* removed gamma_r and gammaf_r functions from math.h
2011-12-11 12:28:53 +01:00
Alexander von Gluck IV 61cf713381 Include file style cleanup, no functional change 2011-12-09 21:26:41 -06:00
Alex Wilson 29ef6eb52d Fix BMenu behaviour/ABI by reinstating BMenu::InvalidateLayout()
It turns out,this is an old method added by Be, and is not really related to BView::InvalidateLayout(bool). In fact BMenu::InvalidateLayout() does something separate, but related to the BView method. I was wrong to delete this method, since it needs to have action taken each time it is called, so moving these actions into LayoutInvalidated() only worked sometimes (when the BView was considered to have a valid layout).

I have added a comment for future hackers so that they don't delete this method.
2011-12-08 14:09:35 -07:00
Rene Gollent 4cc7fee152 Fix broken debug output. 2011-12-06 21:32:09 -05:00
Michael Lotz dd26f81c56 Add an UTF8NextCharLen() version that takes a string length.
This one works with non-terminated strings that we may need to handle.
It also validates that the sequence is valid UTF-8 so it results in
the same behaviour as the version that is used when converting to
codes (syncing the enumeration and drawing behaviour).
2011-12-06 19:09:56 +01:00
Michael Lotz 5cbe06f482 Allow replacing the object cache with the guarded heap.
This allows to use the debug features of the guarded heap also on
allocations made through the object cache API. This is obivously
horrible for performance and uses up huge amounts of memory, so the
initial and grow sizes are adjusted accordingly.

Note that this is a rather simple hack, using the object_cache pointer
to transport the allocation size. The alignment is neglected completely.
2011-12-04 13:52:06 +01:00
Michael Lotz 7418dbd908 Introduce debug page wise kernel area protection functions.
This adds a pair of functions vm_prepare_kernel_area_debug_protection()
and vm_set_kernel_area_debug_protection() to set a kernel area up for
page wise protection and to actually protect individual pages
respectively.

It was already possible to read and write protect full areas via area
protection flags and not mapping any actual pages. For areas that
actually have mapped pages this doesn't work however as no fault, at
which the permissions could be checked, is generated on access.

These new functions use the debug helpers of the translation map to mark
individual pages as non-present without unmapping them. This allows them
to be "protected", i.e. causing a fault on read and write access. As they
aren't actually unmapped they can later be marked present again.

Note that these are debug helpers and have quite a few restrictions as
described in the comment above the function and is only useful for some
very specific and constrained use cases.
2011-12-03 19:49:18 +01:00
Michael Lotz 643cf35ee8 Add debug helper functions to mark pages present.
They can be used to mark pages as present/non-present without actually
unmapping them. Marking pages as non-present causes every access to
fault. We can use that for debugging as it allows us to "read protect"
individual kernel pages.
2011-12-03 19:45:31 +01:00
Michael Lotz 44dffa86c0 Fix the etc path that was accidentally changed. 2011-12-02 14:22:28 +01:00
Alex Wilson 182e2ee973 Add a bit more FBC stuff for the Layout API, which I missed before. 2011-12-01 22:47:46 -07:00
Alex Wilson d56e7bd64d Make archiving hooks protected in layout classes.
Furthermore,
* remove a stray blank line in Layout.cpp
* make BLayoutItem::SetLayout() private, as it should have been
2011-12-01 20:45:50 -07:00
czeidler 57014d1ff7 Make tabs BReferenceable. Maintain a list of tabs. 2011-11-30 17:55:36 +13:00
Ingo Weinhold 363c147d86 FreeBSD host sys/stat.h: Add missing extern "C" 2011-11-28 05:11:35 +01:00
Ingo Weinhold 62f5df5852 Provide futimens(), utimensat() missing on FreeBSD 2011-11-28 05:02:09 +01:00
Michael Lotz 79f0056002 Fix virtual 8086 mode to properly account for TLS.
* The vm86 code or the code running in virtual 8086 mode may clobber the
  %fs register that we use for the CPU dependent thread local storage
  (TLS). Previously the vm86 code would simply restore %fs on exit, but
  this doesn't always work. If the thread got unscheduled while running
  in virtual 8086 mode and was then rescheduled on a different CPU, the
  vm86 exit code would restore the %fs register with the TLS value of
  the old CPU, causing anything using TLS in userland to crash later on.
  Instead we skip the %fs register restore on exit (as do the other
  interrupt return functions) and explicitly update the potentially
  clobbered %fs by calling x86_set_tls_context(). This will repopulate
  the %fs register with the TLS value for the right CPU. Fixes #8068.

* Made the static set_tls_context() into x86_set_tls_context() and made
  it available to others to faciliate the above.

* Sync the vm86 specific interrupt code with the changes from hrev23370,
  using the iframe pop macro to properly return. Previously what was
  pushed in int_bottom wasn't poped on return.

* Account for the time update macro resetting the in_kernel flag and
  reset it to 1, as we aren't actually returning to userland. This
  didn't cause any harm though as only the time tracking is using that
  flag so far.

* Some minor cleanup.
2011-11-25 16:10:19 +01:00
Ingo Weinhold 085f6723a4 Fix build due to <directories.h> move
Apparently I should have done a complete rebuild after moving
directories.h from headers/private/libroot to .../system, since a lot of
stuff didn't build anymore.
2011-11-25 06:19:50 +01:00
Ingo Weinhold 9213e9d6a8 Add BPackageRoster::GetActivePackages()
The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.
2011-11-25 06:19:49 +01:00
Ingo Weinhold 26265b7b4d Add class BPackageInfoContentHandler
A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.
2011-11-25 06:19:48 +01:00
Ingo Weinhold e35a99be4c Pull class BPackageInfoSet out of BRepositoryCache 2011-11-25 06:19:47 +01:00
Ingo Weinhold 9968845d69 Use BStringList in package kit
Replace all instances of BObjectList<BString> by BStringList.
2011-11-25 06:19:46 +01:00
Ingo Weinhold 7de6af25e9 Add a BStringList class 2011-11-25 06:19:45 +01:00
Ingo Weinhold ad07ecd821 BString::Private class to access BString internals 2011-11-25 06:19:45 +01:00
Ingo Weinhold 4f5f15f080 BRepositoryCache: Add iteration, etc.
* Remove InitCheck() and the initializing constructor.
* Rename PackageCount() to CountPackages().
* Use BOpenHashTable instead of HashMap for the internal PackageMap.
* Allow multiple packages with the same name. Equally named packages are
  in a singly linked list after the first package with that name.
* Add an Iterator inner class and a GetIterator() method, so one can now
  iterate through the packages in the repository.
2011-11-25 06:19:44 +01:00