Commit Graph

34572 Commits

Author SHA1 Message Date
Ingo Weinhold
f71274580b * Private libroot locking primitives:
- Reimplemented mutex to use the _kern_mutex*() syscalls.
  - The initializer functions cannot fail anymore -- changed their return type
    to void.
  - Changed the initializer function semantics to not copy the name by default
    anymore (as in the kernel). Also added *_etc() versions of them that take an
    additional flags.
  - Added static initializer macros.
  - Made the mutex (and thus recursive_lock) lock functions non-interruptable.
  - Got rid of the "lazy" version. They are no longer needed, since the
    initialization of the standard types can be done statically and cannot fail.
* Adjusted libroot, runtime loader, and other code using the private libroot
  locking primitives to the new semantics.
* pthreads mutexes and condition variables:
  - Reimplemented using the _kern_mutex*() syscalls.
  - Consistently use POSIX error codes.
  - Fixed some not quite POSIX compliant behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:52:49 +00:00
Ingo Weinhold
251e72542e Added TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:48:12 +00:00
Adrien Destugues
0638c3ab4c * Add some more icons for better testing
* Use the country name instead of the language name to identify each icon
 * Cleanup, fixed copyrights, and some more checks to avoid crashing in case of a missing icon


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:34:00 +00:00
Ingo Weinhold
35ca8fd8aa Added various missing functions to the error mapper.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:23:46 +00:00
Ingo Weinhold
0dffa8d48e * remove_user_mutex_entry(): The next entry wasn't removed from its own list.
* user_mutex_unlock_locked(): Set or clear the locked flag depending on whether
  we wake up a waiter.
* _user_mutex_switch_lock(): The syscall cannot be restartable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:21:32 +00:00
Fredrik Holmqvist
186058c517 Some corrections and cleanup to ACPI Embedded controller:
* Exposed ACPI API needed by Embedded Controller
	This will be removed again if moved inside the bus manager.
	It also duplicates ACPI's own headers so it might go out of sync atm.
 * Added mutex to controller and fixed the mixup between acpi_status needed in int handlers and Haiku status.
 * Major code cleanup
	Not for headers as they are mostly redundant if we move the controller.
	Variable names still needs some cleanup

This makes the ACPI errors from the controller understandable. I get AE_NO_HARDWARE_RESPONSE now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 19:23:43 +00:00
Jérôme Duval
dd41712c26 * added more L2 cache labels
* white space cleaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 19:16:55 +00:00
Michael Lotz
1da48c4149 Simplify the SetTrigger() code. The trigger is a single byte char anyway, so no
need to convert the looked up label position to a char code. Also actually make
sure that the trigger is lower case by doing an explicit tolower() instead of
assuming that it already is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:56:34 +00:00
Michael Lotz
bae33cdad5 Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:54:30 +00:00
Adrien Destugues
ffbcecd489 Add support for flags in BCountry. The flags are stored as HVIF icon resources in liblocale.so.
Test french flag took from http://www.bastisoft.de/misc/flags/ (licence is very permissive), converted to HVIF with Icon O Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:52:20 +00:00
Michael Lotz
8c4c164a91 Make the result a proper const char *.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:51:49 +00:00
Axel Dörfler
362b036d1a * Applied a slightly edited patch by Christophe Huriaux, as part of ticket
#5724: this adds a settable filename for the silent invocation, thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:25:51 +00:00
Axel Dörfler
e3ce6e4be5 * Added warm reboot functionality based on a patch by Grey, thanks! It can be
invoked using the 'w' key.
* Checking allocations doesn't hurt.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:10:00 +00:00
Axel Dörfler
868aa7a0e0 * Added shortcut handling to the boot loader menu (in preparation of adopting
ticket #5312).
* Added shortcut 'b' to continue booting, 'r' to reboot.
* Consolidated asterisk style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:07:40 +00:00
Joachim Seemer
1cae99d78e Updated welcome page. Thanks to all translators.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:02:06 +00:00
Joachim Seemer
71b14067a1 Updated userguide. Thanks to all translators.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:01:21 +00:00
Adrien Destugues
5e7931beaa Separate LanguageListView from LocaleWindow as it was occupying more than half of the file and will grow even more soon.
No functionnal change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 17:48:31 +00:00
Michael Lotz
2272ecea26 zooey+mmlr:
* Ensure that there is still buffer left when 0-terminating the buffer in
  RealText().
* Remove the fExtraCount member and instead make it into a constant as that's
  how it's used and more obvious.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 17:22:16 +00:00
Axel Dörfler
7af231d838 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 17:05:20 +00:00
Michael Lotz
5c4e7641a7 zooey+mmlr:
* Large cleanup in _FindLineBreak(), be a bit more clever by storing the found
  offsets instead of calculating them multiple times, use
  _TabExpandedStyledWidth() instead of _StyledWidth() and manual tab calculation
  which was also broken (it assumed tabs were consequtive which was possibly not
  the case).
* Modified CanEndLine() to also return true when going from non-whitespace to
  whitespace and the other way around which is more logical (so we'd break after
  the word and not after word + whitespace, even though we actually do that
  in the end by eating whitespace after words in _FindLineBreak()).
* The TextGapBuffer is not necessarily 0 terminated, so RealCharAt() needs to
  check if the index is at the end of the string and return 0 in that case.
  Before it would access the buffer "out by one" which could've lead to a crash.
* Simplified the gap moving calculations by removing some no-op calculations.
* Added debugger calls in TextGapBuffer in case of invalid use.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 16:12:16 +00:00
Adrien Destugues
87158047dd Add a call in BCountry to get an icon for that country.
Untested and not working yet since we don't provide any icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:57:30 +00:00
Axel Dörfler
024bc08b2f * Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:51:47 +00:00
Michael Lotz
ec7d168081 Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:48:48 +00:00
Axel Dörfler
24386c2937 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:33:20 +00:00
Axel Dörfler
87e256c2e8 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:32:56 +00:00
Axel Dörfler
e486a4d0dc * Moved consoled to bin/ - it's not really a test application.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:32:00 +00:00
Ingo Weinhold
2385d1bdc8 * Replaced bogus perror() calls with printf()s.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:25:10 +00:00
François Revol
af0bb8e3d3 Implement creating attributes, though still with a broken mapping loosing the type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:15:36 +00:00
Adrien Destugues
e6769b02ce Fix Language::GetName using the system-wide language settings instead of the current application one. Make ReadOnlyBootPrompt localize the list instantly when you select a language in it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 14:57:39 +00:00
Ingo Weinhold
c25c05da25 * Fixed incorrect check: The behavior of pthread_mutex_unlock() is undefined
when called with a default-type mutex owned by another thread.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 14:20:02 +00:00
Axel Dörfler
fba2ee2527 * We should check for the I/O APIC before mapping it (since we panic if mapping
it failed...).
* Moved IRQ table reading much earlier (before starting to program the I/O
  APIC), though it currently fails, possibly because the device manager isn't
  up yet, and there is no embedded controller driver.
* The kernel now enables I/O APICs by default, but the boot loader disables
  them - you can now enable them using the safe mode menu, but it currently
  won't have any (positive) effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 13:54:15 +00:00
Axel Dörfler
8f49507c1d * Added MSI support (might help with bug #5511).
* Fixed wrong return type from wpi_read_prom_data().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 13:04:05 +00:00
Axel Dörfler
edd8c1c247 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 13:02:35 +00:00
Axel Dörfler
9de17be600 * Moved I/O APIC initialization to a later point, now the APCI and DPC modules
can safely be used.
* Since using the I/O APIC is disabled by default, I've removed the "return"
  that prevented its use when enabled. Let's see if it already does anything.
* Adapted other arch_int.cpp with a bit of cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:42:10 +00:00
Axel Dörfler
e1bef3de00 * Use send_signal_etc() instead of resume_thread() to prevent immediate
rescheduling; this allows DPC queues to be created before the scheduler is
  running.
* Removed BeOS R5 support.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:31:56 +00:00
Adrien Destugues
eec1db5a07 Fix language display i ReadOnlyBootPrompt :
* On a simple language like "fr", it will display "French"
 * On more complex things like "pt_BR", it will display "Portuguese (Brazil)"


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:21:17 +00:00
Adrien Destugues
0223612e7e Fix bug that crashed ReadOnlyBootPrompt. Basically it would not check the right function in the catalog addons before calling it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:07:56 +00:00
Adrien Destugues
20765a032c Sync portuguese translation from hta.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 11:56:58 +00:00
Adrien Destugues
f9e3fc494b Sync pt_br translations from hta.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 11:44:25 +00:00
Michael Lotz
fdad233b47 Move the actual area deletion out of the locked section as we could otherwise
double/deadlock when we delete heap areas because of other area deletions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 11:13:16 +00:00
Axel Dörfler
7380abeb44 * Implemented the debugger mode for the USB keyboard driver.
* Made the USB keyboard driver safe to be used from more than one team - only
  the first one will be able to retrieve any keys. Before, since there was no
  locking, internal structures would have been messed up in that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 09:03:32 +00:00
Clemens Zeidler
d5009951b7 Scale the output to the correct resolution. Finally got the correct resolution on my laptop :-)
Possibly fixed the monitor timming.

TODO: 
- Very big code cleanup.
- At the moment there is only one hardcoded dislplay_mode (1366 x 768).




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 09:01:35 +00:00
Axel Dörfler
8ef609cc5f * Now actually launch more than one keyboard thread (before that would have
worked only if all drivers were in one directory).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 09:00:11 +00:00
Axel Dörfler
7089514138 * Pass the cookie to ProtocolHandler::Close() as well.
* Removed superfluous semicolons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 08:31:50 +00:00
Axel Dörfler
447b0afd93 * Use const where appropriate.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 08:18:37 +00:00
Axel Dörfler
2feb1a7f3a * consoled now opens all drivers that support the debugger mode, and runs a
thread for each of them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 08:10:13 +00:00
Jérôme Duval
0b807bb6ed this seems to annoy gcc4, remove it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 23:48:49 +00:00
Adrien Destugues
8025477189 * Implement a function to get all the available languages for a given application
* use it in readonlybootprompt instead of previous workaround code.
This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 23:48:01 +00:00
Jérôme Duval
9904bec576 merge coreutils 8.4
added nproc to the image


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 22:26:54 +00:00
Axel Dörfler
48450caac5 * Prepared driver for the implementation of the debugger mode: there is now a
uint32 cookie that is saved per file handle and passed to the ProtocolHandler
  objects.
* Beware that the output of the driver no longer shows the handler as pointer,
  but the internal device cookie.
* Added handling of KB_SET_DEBUG_READER to the KeyboardDevice class (it just
  doesn't do anything with that).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 21:59:15 +00:00