Commit Graph

202 Commits

Author SHA1 Message Date
Ingo Weinhold 2222d0559d * Introduced new header directory "config", which ATM contains HaikuConfig.h
and types.h. The idea is to provide a basic architecture/compiler
  abstraction by defining types and macros that allow the posix/ and os/
  headers to be mostly architecture/compiler agnostic. 
* Adjusted the posix/ and os/ headers accordingly.
* <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI*
  and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int*
  types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX
  macros. Also the B_PRI* and B_SCN* macros are available unconditionally,
  unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be
  defined in C++ mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 19:44:07 +00:00
Axel Dörfler 0667145547 * Fixed indentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-30 12:36:21 +00:00
Michael Lotz ace6934d79 While the AutoLocker is not public at least make BAutolock a bit more useful by
also providing Lock() and Unlock(). Applied public header style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-30 01:00:23 +00:00
Stephan Aßmus d4d27fac86 * Rewrote MediaDefs.h and MediaEncoder.h
* Moved MediaKit errors into Errors.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-28 12:42:36 +00:00
Stephan Aßmus 81506b0100 Optimized includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-28 12:30:04 +00:00
Axel Dörfler d7571ebcf7 * Rewrote headers as needed.
* Cleaned up our own headers.
* Moved translator errors into Errors.h.
* Removed extra TranslationKit.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 14:20:56 +00:00
Ingo Weinhold c527fef824 Added type constant B_XATTR_TYPE. This is not a data type, but rather a marker
that can be used for node attributes, when those originate from Linux xattrs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 21:22:25 +00:00
Ingo Weinhold 7c44760049 Added ENOATTR.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 21:20:05 +00:00
Axel Dörfler e90b90daf6 * Added desperately missing Trim() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 21:13:19 +00:00
Ingo Weinhold 1746066cde * Made _Allocate() static.
* Moved the private inline methods up in the source file, so they can actually
  be inlined.
* UnlockBuffer(): Removed superfluous "if". Maybe the one who wrote it can have
  a look and check whether something else was intended originally.
* _MakeWritable() (both versions): Removed the superfluous ref count increment
  and the matching decrements.
* _Resize(): Fixed ref count ASSERT. It would always be triggered when called
  from UnlockBuffer(), since the ref count is -1 in that case.
* Clarified some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 00:04:46 +00:00
Ingo Weinhold ff293f209a Added (const char*) cast operator. That makes BString more convenient to pass
around, particularly returning it from methods instead of a const char*, if the
object stores the string as a BString anyway, thus leveraging CoW.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 13:11:30 +00:00
Axel Dörfler e52400cf24 * Fixed a race condition in the former _Detach*() functions: since atomic_get()
was used, two different threads could decide to share the same mutable string.
* Renamed some functions to make clearer what they do, ie. _Detach() is now
  called _MakeWritable().
* Cleaned up some questionable semantics, like the const char* parameter in
  _DetachWith() - you can now choose to copy the original string or not with
  a boolean. This also makes sure that the string is actually copied when it
  has to, which wasn't the case before (but that was no problem with the way
  that function was used).
* Made the header compliant with our style guide.
* Further cleanup.
* All BString related unit tests are passed, so I guess I didn't break too
  much :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-06 11:23:17 +00:00
Ingo Weinhold 9073b0dccc Made _debuggerAssert()'s "message" parameter const. Fixes building with gcc4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 12:21:20 +00:00
Ingo Weinhold 39d58e2f49 Experimental approach to tackle the problem with Be's negative error codes and
ported software:
* If the macro B_USE_POSITIVE_POSIX_ERRORS is defined the POSIX error code
  constants (ENOMEM, EINTR,...) will have positive values.
* Introduced the macros B_TO_{POSITIVE,NEGATIVE}_ERROR() which do convert a
  given error code to a positive/negative value.
* Added static library libposix_error_mapper.a that overrides all POSIX
  functions (save the ones I forgot to add :-)) directly meddling with error
  codes (having them as parameter or returning them) dealing with the
  positive<->negative error code conversions. The functions have hidden
  visibility, so they affect only the shared object they are linked into.
* So ideally all one has to do is to build a ported software with
  -DB_USE_POSITIVE_POSIX_ERRORS and -lposix_error_mapper and be good with
  respect to error code problems.
* Potential issues:
  - When mixing ported and Haiku native code, i.e. using Haiku native code in
    a ported software or using a ported library in a Haiku native application
    care must be taken to convert error codes where the two interface. That's
    what the B_TO_{POSITIVE,NEGATIVE}_ERROR() macros are supposed to be used
    for.
  - A ported static library can obviously not be linked directly against
    -lposix_error_mapper. The shared object linking a against the ported static
    library has to do that. The previous point applies when that causes mixing
    with Haiku native code.
  - When dependent ported libraries are used probably all of them should use
    the error mapping.

Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 15:43:03 +00:00
Ingo Weinhold f451e14bc2 Added InitCheck() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 02:05:10 +00:00
Axel Dörfler 1b21be7091 * BBufferIO did not implement Seek() and Position() correctly; it just passed
it to the stream. This caused Read()/Write() to need two syscalls for nothing
  (this only caused the actual stream to share the same position with the
  BBufferIO, something you just cannot rely on when using buffered I/O).
* Anyway, this reduces the time VirtualBox needs to open some RAW test images
  from over 4 minutes to less than 15 seconds...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:23:45 +00:00
Stephan Aßmus e1f3108a60 Patch by Scott:
Make sure the comments are C style in headers that are included by POSIX
headers.

Thanks! Should fix #2870.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 23:50:42 +00:00
Maurice Kalinowski 53779f07a4 fix gcc4 warning about wrong argument type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-15 19:21:00 +00:00
Rene Gollent 0c8bdbafd5 Revamp BList somewhat to further optimize the resizing behavior.
We now keep track of a lower bound as to when the list should scale
itself back down. When increasing the list size, we double the current,
with the lower bound set to 1/4 of the current size, not allowing it to
go any smaller than the block size. These combined allow us to do very
cheap tests to see if an operation requires a resize at all, and minimize
how often the list actually needs to be resized, since the difference in upper
and lower bounds prevents bouncing back and forth between a size in the case
of adding/removing an item while close to a boundary. All in all this should
make BList noticably more scalable when doing large numbers of add/remove
operations.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:30:28 +00:00
Ingo Weinhold 965aa03f49 Changed all error codes from enum values to macros. This allows for
compile time checks. Incidently those are not totally uncommon in
portable code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 20:54:14 +00:00
Axel Dörfler 4b83262008 * _Realloc() did not initialize the reference count either.
* _Alloc() can now preserve the original reference count, only _Clone()
  still initializes it to 1. As Karsten pointed out, this is necessary to
  preserve the "shareable" status of the private data.
* I hope that's finally it. What happened to our testing suite, anyway? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 22:56:27 +00:00
Axel Dörfler bf4ddb61e1 * As found by Karsten, the reference count was not initialized in
_ReplaceAtPositions(), and _DoCharacterEscape() (we don't need to preserve
  it, though, as it must be 1).
* Factored out an _Alloc() method which is now always called when the private
  data is allocated. It also takes care of correct initialization (and thus
  fixes the above problem).
* This fix finally allows turning on reference counting again, thanks Karsten!
* Minor cleanup, renamed "oldAdr"/"newAdr" to "oldString", resp. "newString".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 19:14:05 +00:00
Axel Dörfler 688c14266c * After my last change, _IsShareable() was called on the wrong string in the
copy constructors, effectively turning of references completely.
* Since that caused troubles (NetPositive now crashes when started), I
  temporarily disabled references by letting _IsShareable() always return
  false until the issue is resolved.
* _FreePrivateData() now sets the fPrivateData member to NULL, and is also
  safe to be called when fPrivateData is NULL.
* Removed my comment about the threading problem in _Detach() and _DetachWith()
  as that just couldn't happen.
* _Clone() must not use memcpy() as the string pointed to by "data" might not
  be as long as "length".
* LockBuffer() now marks a string as unshareable.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 14:14:44 +00:00
Axel Dörfler 002b33b720 * Fixed a bunch or concurreny bugs and memory leaks of the new reference
string stuff.
* It's still not thread-safe for all usage patterns, though, so we might want
  to remove or disable it: if a string is shared between several threads, and
  one of those starts to use a reference, all kinds of problems can happen.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-08 19:05:09 +00:00
Karsten Heimrich 93608e10d1 * fixed coding style...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 22:22:43 +00:00
Stefano Ceccherini 576e2bf833 Patch by Julun: implements a refcounted BString. Thank You!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 21:16:58 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Jérôme Duval 5d5a6848b5 added printf format attributes for gcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-11 18:55:27 +00:00
Axel Dörfler 9c62a6ed7d Rewritten Debug.h by Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-30 14:43:25 +00:00
Ingo Weinhold 2c97a8d164 Use -I instead of -isystem for system header directories when building
with gcc 4. Fixed resulting build errors (gcc is more lenient for
headers in -isystem directories).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-14 20:36:42 +00:00
Ingo Weinhold 24f10d18b1 Added missing B_ATOM_TYPE AND B_ATOMREF_TYPE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-23 23:16:31 +00:00
Axel Dörfler 4a50aa51f2 Applied another patch by Vasilis: this one replaces all C++ style comments with
C style ones, as this is a C header, too (and a very basic one).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-27 16:26:37 +00:00
Axel Dörfler 686bdd59d3 Rewritten Errors.h, courtesy of Vasilis Kaoutsis - thanks for all the work!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 22:11:00 +00:00
Axel Dörfler 087882c26e * Rewrote headers as necessary; only Errors.h and Debug.h still originate from a Be header now;
feel free to change that ;-)
* Cleaned up existing headers.
* Coding style guide update to BBufferIO (renamed m_* members to f*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:36:29 +00:00
Axel Dörfler 43cca04a9a Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 18:06:38 +00:00
Axel Dörfler bae87c9140 Added a new type for the vector icon format 'VICN' or B_VECTOR_ICON_TYPE.
It's hopefully now used everywhere instead of B_RAW_TYPE where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-07 02:46:25 +00:00
Ingo Weinhold 9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00
Bruno G. Albuquerque 92c6f0417b How could we live without this?
Added B_DONT_DO_THAT error define.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-24 22:52:56 +00:00
Axel Dörfler 64f10d7d89 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-30 12:40:15 +00:00
Jérôme Duval 6c61b2841f moved B_PROPERTY_INFO_TYPE definition to TypeConstants.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-22 12:21:46 +00:00
Stephan Aßmus 39c991c0f3 Added BPositionIO::GetSize() and implemented it by means of Seek() and
Position(). This used up a virtual slot of BPositionIO. GetSize() needed to be
implemented in BFile, which uses the BStatable version as before. This should
hopefully be binary compatible. The only problem could be in source
compatibility when there are classes inheriting from BPositionIO implementing
their own GetSize().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 13:27:53 +00:00
Axel Dörfler b2b2b75a41 Fixed some style issues. Happy recompiling! :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 18:50:48 +00:00
Axel Dörfler 31dc79a18b * Added B_MINI_ICON_TYPE and B_LARGE_ICON_TYPE to TypeConstants.h.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 01:30:03 +00:00
Ingo Weinhold 338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Ingo Weinhold a406236dc2 New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
  the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
  shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:50:29 +00:00
Axel Dörfler 09b83e5cec Removed the obsolete byteorder.h header (it just included ByteOrder.h).
Fixed the remaining references to that header in our repository.
Note, this might break source compatibility - please update your sources :-)
Slightly converted UBS_audio_utils.c to use our style guide while I were at it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 08:12:59 +00:00
Axel Dörfler ec5a9998df Added a B_NOT_SUPPORTED synonym for EOPNOTSUPP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-05 13:56:16 +00:00
Axel Dörfler ae614d48fc Some minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-04 23:00:48 +00:00
Axel Dörfler 61ad5bc2e7 Fixed various problems with the latest stdbool.h changes, including stdbool.h itself:
- SupportDefs.h only includes stdbool.h if included from C
- stdbool.h for C++ now includes a macro for "bool" as defined by that header
- stdbool.h does nothing if __bool_true_false_are_defined is already defined
- stdbool.h no longer defines a _Bool enum, but defines _Bool as unsigned char, as
  previously done by SupportDefs.h (the previous version changed the size).
- The gensyscalls Jamfile now preprocesses its headers in C++ mode so that "bool"
  stays "bool", and doesn't become _Bool.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-26 18:01:40 +00:00
Jérôme Duval aab32edf08 updated stdbool.h
SupportDefs.h now includes stdbool.h
This can break in some cases


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-25 17:08:27 +00:00
Jérôme Duval 9f20e1783b added some missing posix error codes. i don't know if they exist as BeOS error codes at all
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 16:42:07 +00:00
shatty fc8af3cfe7 avoid missing prototype warning
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-22 04:42:09 +00:00
haydentech 49c997b9b1 The sys/types.h header define varies by platform, so check for both possibilities
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-26 16:54:54 +00:00
Axel Dörfler a4733dd5dd Added some more error message found in Dano headers - not sure if we'll keep them, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-23 23:21:20 +00:00
haydentech f498e59387 Quell a couple gcc3 warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-22 21:59:37 +00:00
Stefano Ceccherini 5480b4590e Another patch from Oliver Tappe: BString behaves better when the user supplies out-of bounds values in Insert(), Remove(), etc.
Code is refactored, and it fully complies with our guidelines.
Tests have been updated too (hint: try the replace tests with R5 and our implementation...)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 07:35:16 +00:00
Axel Dörfler 8c894b6039 No longer needed, the new syslog.h is now correctly placed in the posix/
directory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 14:41:30 +00:00
shatty 80d0dc75a6 more helpful argument names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 21:13:50 +00:00
Ingo Weinhold 340eed61d6 Moved definition of _FreeBlock to the source file and enabled its "magic{1,2}" fields on debug only.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-07 12:04:24 +00:00
Ingo Weinhold 369eef1343 Check in per Jeremy Rand: Adjusted implementation to behave like that in R5 -- no more tracking of excess blocks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-07 11:55:25 +00:00
beveloper 188b5de0bf renamed atomic_read() into atomic_get() (since we already have atomic_set(), but not a atomic_write())
renamed user_??? functions into the new _user_??? naming style.
changed implementation of PPC 64 bit atomic functions to use (un)lock_memory()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 01:21:56 +00:00
beveloper 3c839f3f7b fixed description
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 01:22:44 +00:00
beveloper ad159f4343 cleaned up meaning of first constructor parameter
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 00:54:54 +00:00
beveloper 2fc06b8774 Replaced the broken BBlockCache implementation.
According to the BeBook, it is NOT allowed to allocate one large
pool, instead the memory blocks must be allocated individually.
To achieve O(1) for both Save() and Get() function, only one list
of free blocks is maintained.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 00:27:08 +00:00
Axel Dörfler 6f82bba82a Adds our own, shiny, and almost BeOS compatible parsedate.h header (but not
in the Posix dir).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-23 18:25:11 +00:00
beveloper d3e72fa555 added missing 32 bit atomic functions,
and added all their 64bit counterparts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-20 02:08:13 +00:00
Stefano Ceccherini 19787aaf71 Removed BGA's uint32 utf8_char_len(uchar c)
function from this public header, since it's not safe, and it's slower than parsing bytes one by one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-17 15:35:39 +00:00
Axel Dörfler 154aaaf273 Removed B_NOT_SUPPORTED again - EOPNOTSUPP is a socket specific error code
and it should have read B_NOT_SUPPORTED_ON_SOCKET.
We could reintroduce it later (along with other missing network errors).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-17 00:38:45 +00:00
Axel Dörfler 9de96ae6c6 Changed new codes after suggestions from Ingo and Marcus.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-17 00:08:33 +00:00
Axel Dörfler 68145d0df8 Added some new B_* names for existing POSIX error codes - please review.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-16 20:37:43 +00:00
Ingo Weinhold 954125b77f Header rewritten from the scratch.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-04 18:38:49 +00:00
Ingo Weinhold e56907d4fd The first version of this file has been created by me, having been directly derived from a BeOS R5 header. To avoid copyright problems I remove it now and rewrite it from the scratch. Hang on...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-04 17:56:00 +00:00
haydentech 30fd51473f Minor header-related changes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-14 17:21:46 +00:00
Ingo Weinhold 67330a1267 Added missing _DoReplace().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-15 20:08:36 +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
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
ejakowatz d2f82aa6e3 Added B_NOT_A_MESSAGE error code (borrowed from Dano).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-18 07:33:55 +00:00
Stefano Ceccherini 9bf6d51b04 The header is now R5 binary and source compatible
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-06 14:24:06 +00:00
Stefano Ceccherini 769a895450 Corrected some inaccuracies imported from the BeOS headers:
CapitalizeEachWord() DOESN'T capitalize words separated by spaces, it
capitalizes words separated by non alphabethical  characters.
FindLast(char, int32) prototype was misleading.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-18 13:45:27 +00:00
shatty 80b7a8e57c added 3 missing conversions - mysterious!
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-16 21:36:29 +00:00
ejakowatz 8f1a4e7f89 Implemented BGA's UTF-8 char len suggestion in UTF8.h and used it in
BString::CountChars().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-14 08:06:18 +00:00
beveloper 7d9ef5af20 avoid collision with <netinet/in.h>
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 23:38:46 +00:00
beveloper 0e2e5d7f76 added EHOSTDOWN, required by the net kit.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 20:33:01 +00:00
lillo 343b352fe1 Signals, 2nd pass: syscall restarting now only works on EINTR (removed other exotic retcodes like ERESTARTSYS); signal handlers now receive 3 args, and the vregs struct is used to save the signal context, making the system beos compatible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-26 13:31:22 +00:00
lillo f510e6ce60 posix signals support, 1st pass
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 17:31:10 +00:00
beveloper d734a8ce5a some header files to be R5 compatible
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 13:54:44 +00:00
shatty 1c5c50fc82 fixed newline at end of file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-27 23:44:26 +00:00
Stefano Ceccherini a15ed5a14a fixed a typo
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 14:22:16 +00:00
Stefano Ceccherini 893d12fc2c Lots of bug fixes and code semplification
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-23 21:02:00 +00:00
Stefano Ceccherini 6ad2c5a19c Added a first BString header
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-06 07:12:06 +00:00
ejakowatz 3b90fe8733 This has been merged into DataIO.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-02 04:43:19 +00:00
ejakowatz 9078d4766e Added Jack Burton's DataIO-related stuff and cleaned things up a bit.
Several files managed to get left out of the build process; changes to
support.src fixed that.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-29 04:59:46 +00:00
beveloper d7e6d6f0a3 fix a minor problem
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-28 17:26:06 +00:00
jrand e39c71fce8 Remove R3 compatibility details from BPropertyInfo, fix memory leak and implement endian-ness
aware flatten and unflatten code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-21 06:44:27 +00:00
ejakowatz e75560e6cb Initial checkin.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 04:56:14 +00:00
Axel Dörfler c3db7c3b9e Added the B_BAD_DATA error.
Removed all the whitespaces at the end of every line.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-23 14:03:46 +00:00
David Reid afe886fc48 Obey the gods of source compatability. Progress is evil. (apparently)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-12 14:57:37 +00:00
David Reid f16873a60e OK, final change to error codes for a while I hope.
- remove private/kernel/Errors.h as this was just plain wrong to have it
  there and confused issues somewhat.
- add the kerrors.h file that has kernel only error codes, namely the
  ERR_ codes from newos.
- add comments for the other header files to tell people where to find
  error code definitions in an attempt to stop people getting lost!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-11 22:17:09 +00:00
David Reid d69c1d7983 Move errno.h to it's correct place
Adjust Errors.h to use errno.h for the posix error codes
add first stab at limits.h, albeit not using the gcc headers at
present for intel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@88 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-11 20:39:30 +00:00
Ingo Weinhold cdcd225793 DataIO.h has to include MallocIO.h. Be has only the first header containing all declarations.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@25 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-10 01:58:14 +00:00
Ingo Weinhold 9377918226 This file shadows Be's header. So if it doesn't contain anything, iclude at least the original header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@17 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 21:39:34 +00:00
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00