Commit Graph

688 Commits

Author SHA1 Message Date
Jonas Maebe
2701a0f743 * initialise timespec.tv_sec again for generic BasicEventWaitFor
git-svn-id: trunk@8836 -
2007-10-17 21:14:01 +00:00
micha
5f3e2b10e8 * use sem_timedwait for BasicEventWaitFor if available (linux now)
git-svn-id: trunk@8835 -
2007-10-17 20:49:25 +00:00
micha
5d1a952f2a * fix initial state of basicevent
git-svn-id: trunk@8781 -
2007-10-13 20:25:46 +00:00
Almindor
fdcc5f4332 * use TIOCtlRequest instead of hard ifdefs to remove warnings
git-svn-id: trunk@8679 -
2007-09-29 14:22:41 +00:00
Almindor
5474e0c987 * fix ioCtl differences between BSD and POSIX
git-svn-id: trunk@8676 -
2007-09-29 08:24:23 +00:00
marco
827d380691 * pchar(pointer()) isms that were safe.
git-svn-id: trunk@8672 -
2007-09-28 21:57:45 +00:00
Jonas Maebe
4e78a30ee3 * only print exception backtrace at end of unhandled exception in
tthread in case rtl is compiled with -dDEBUG_MT

git-svn-id: trunk@8595 -
2007-09-21 15:09:08 +00:00
Tomas Hajny
3b3849c02c + AllFilesMask constant added
git-svn-id: trunk@8492 -
2007-09-15 12:09:25 +00:00
Almindor
d2e4f53a13 * hopefuly fix the fp* problems for stat and others
git-svn-id: trunk@8405 -
2007-09-08 13:51:39 +00:00
Almindor
148255b5cf * fix deprecated stat calls to use the fp<> ones and not the other way around
git-svn-id: trunk@8401 -
2007-09-08 09:55:35 +00:00
florian
bcd5fc555a * rtl part of Olivier Coursier's BeOS patch
git-svn-id: trunk@8396 -
2007-09-07 19:25:05 +00:00
peter
65afe53eb0 * fix settimeofday timeval parameter
git-svn-id: trunk@8315 -
2007-08-28 09:29:25 +00:00
Almindor
7a21cb5888 * add preliminary UnixSockets with linux implementation
git-svn-id: trunk@8290 -
2007-08-19 13:35:43 +00:00
Jonas Maebe
815cd2b39d + support for widestring manager based widechar conversions
(widechar<->char, widechar<>*string), based on patch from
    Rimgaudas Laucius (mantis #7758)
  * no longer perform compile-time widechar/string->char/ansi/
    shortstring conversions if they would destroy information
    (they can't cope with widechars with ord>=128). This means
    that you can now properly constant widechars/widestrings
    in source code with a {$codepage } set without risking that
    the compiler will mangle everything afterwards
  * support ESysEINVAL return code from iconv (happens if last
    multibyte char is incomplete)
  * fixed writing of widechars (were converted to char -> lost
    information)

git-svn-id: trunk@8274 -
2007-08-12 20:01:08 +00:00
Jonas Maebe
123362235b * use initc.fpgetCerrno rather than fpgeterrno to get the errno
results of the sem_* routines (since those always come from libc/
    libpthread)

git-svn-id: trunk@8266 -
2007-08-12 08:29:48 +00:00
Jonas Maebe
4457538435 * explicitly unmask SIGSEGV, SIGILL, SIGBUS and SIGFPE at the start
of a new thread (should fix #9073)

git-svn-id: trunk@8265 -
2007-08-11 20:59:37 +00:00
Jonas Maebe
ce86cedd4d * return wrAbandoned rather than wrError from IntbasiceventWaitFor
in case a sleep is interrupted while the event is being destroyed

git-svn-id: trunk@8260 -
2007-08-11 08:13:36 +00:00
Jonas Maebe
ef801ba3a3 * check once more whether we can lock after we've waited
for the entire timeout in IntbasiceventWaitFor

git-svn-id: trunk@8259 -
2007-08-11 08:07:44 +00:00
Jonas Maebe
494fb81dd8 * fixed semaphore implementation based on file handles (select needs
file descriptor + 1 as first parameter, select can also be EIntr)
  * changed IntbasiceventWaitFor (used by syncobjs) so it can emulate
    timeouts (using a loop and short sleeps) (mantis #9414)
  * also added wrAbandoned support to IntbasiceventWaitFor
  * enhanced tbrtlevt.pp to test new functionality

git-svn-id: trunk@8257 -
2007-08-10 20:20:44 +00:00
Jonas Maebe
fd98a0cc5b * don't call runerror if a unix threading error occurs (because this
immediately terminates the whole application), but instead call
    handleerrorframe (which can be converted into an exception) (#7954)

git-svn-id: trunk@8248 -
2007-08-08 13:59:17 +00:00
Jonas Maebe
f3a00b0731 * cache result of GetThreadManager in InitThreads
git-svn-id: trunk@8245 -
2007-08-08 11:33:54 +00:00
Károly Balogh
bee56abb78 - dec(comment_typos,2);
git-svn-id: trunk@8130 -
2007-07-22 10:22:26 +00:00
daniel
354cd09f31 * long double=double on powerpc-linux
* educated guess this is the case on arm-linux as well
  * temporary change: do not alias clongdouble from unixtype into ctypes to prevent
    having to work in two places.

git-svn-id: trunk@8127 -
2007-07-22 10:04:48 +00:00
micha
dd350255a4 * print thread handle unsigned in unix thread debug info
git-svn-id: trunk@8094 -
2007-07-18 20:14:48 +00:00
micha
721ae51cd0 * dump stack when thread terminates because of exception (unix)
git-svn-id: trunk@8093 -
2007-07-18 20:13:39 +00:00
Almindor
5baca0cfd3 * fix IPC for FPC_USE_LIBS
* fix shmget to use size_t as per manpage
* directly use external, don't depend on ipccdecl.inc (may be removed if confirmed)

git-svn-id: trunk@7973 -
2007-07-07 09:13:23 +00:00
daniel
0c3a2a257d * Convert heap to ptruint.
git-svn-id: trunk@7950 -
2007-07-04 19:46:47 +00:00
Jonas Maebe
0d8594a705 * made cwstring thread safe without locks + test (twide4): widestring
manager now has two extra parameterless procedures (ThreadInitProc
    and ThreadFiniProc) which are called whenever a thread begins/ends,
    and cwstring uses these to create separate iconv handles for
    each thread (via threadvars)
  * renamed UCS4 to UCS-4BE/LE, because UCS4 is not recognised by most
    systems
  * clean up all iconv handles on exit, and check whether they are
    valid before doing so

git-svn-id: trunk@7949 -
2007-07-04 18:10:34 +00:00
daniel
f77150fa71 * Fix another bug found by new hint.
git-svn-id: trunk@7819 -
2007-06-26 08:24:09 +00:00
marco
58e3f8ad0d * more deprecated fixes
git-svn-id: trunk@7718 -
2007-06-17 20:31:08 +00:00
marco
0ef2cb0b02 * fixed deprecated
git-svn-id: trunk@7717 -
2007-06-17 20:29:33 +00:00
Jonas Maebe
7b47ebff6b * removed Darwin/Solaris-specific code and fixed all issues by calling
setlocale(LC_ALL,'') per POSIX, which initialises the langinfo stuff
    based on the environment variables (some OS'es do that automatically,
    but at least Darwin and Solaris don't)

git-svn-id: trunk@7672 -
2007-06-15 18:51:06 +00:00
micha
3e97c6b324 * fix cwstring compilation: remove extra "}"
git-svn-id: trunk@7661 -
2007-06-14 14:45:19 +00:00
Jonas Maebe
6111e3e2b9 * also force utf-8 on Solaris, nl_langinfo(CODESET) doesn't work there
either and utf-8 is also its default "international" encoding

git-svn-id: trunk@7660 -
2007-06-14 10:56:29 +00:00
Jonas Maebe
8523bdc831 * force utf-8 for darwin
git-svn-id: trunk@7644 -
2007-06-13 12:59:39 +00:00
Jonas Maebe
172f85c8c3 * fixed important typo in better comments :)
git-svn-id: trunk@7618 -
2007-06-09 20:37:26 +00:00
Jonas Maebe
e93d612f4a * fixed FFreeOnTerminate handing in destructor + better comments
git-svn-id: trunk@7617 -
2007-06-09 20:36:35 +00:00
Jonas Maebe
4dd3be0e5a * return thread function result via pthread_exit() from CBeginThread
(Vinzent Hoefler)
  * simplified CWaitForThreadTerminate based on comments from Vinzent
    Hoefler
  * fixed resource leaks where in some cases a pthread would not be
    reaped based on comments from Vinzent Hoefler (resolves #9016)

git-svn-id: trunk@7588 -
2007-06-06 15:18:48 +00:00
Jonas Maebe
526a79a3c6 * disable thread suspension from another thread under *nix, see added
comments in cthreads.pp why

git-svn-id: trunk@7551 -
2007-06-02 11:39:59 +00:00
marco
08d10efb9f * now also fixes div hz with hz=0 for Linux, and reenables it for FreeBSD. Still needs phys console check though
git-svn-id: trunk@7489 -
2007-05-27 12:00:55 +00:00
Jonas Maebe
d1f7be8c7b * disabled sound/nosound for non-Linux, as the used ioctl is
Linux-specific (and at least under Mac OS X, there seems to be
    no way to play sound without going via the Carbon/Quicktime/...
    frameworks)

git-svn-id: trunk@7488 -
2007-05-27 11:11:13 +00:00
Jonas Maebe
399ab249d6 * initialise/finalise critical section
git-svn-id: trunk@7455 -
2007-05-24 12:24:45 +00:00
Jonas Maebe
7e3b792713 * fixed for solaris:
* iconv is in libc for solaris
    * use official names for unicode encodings (UTF-16BE/UTF-16LE instead
      of unofficial UNICODEBIG/UNICODELITTLE aliases, which are not supported
      by solaris' iconv)

git-svn-id: trunk@7452 -
2007-05-24 11:38:07 +00:00
peter
dd3fdac68e * beos support from Olivier Coursiere
git-svn-id: trunk@7443 -
2007-05-24 07:16:17 +00:00
Jonas Maebe
3ab9ace8c4 * implement CThreadSwitch using sched_yield()
git-svn-id: trunk@7429 -
2007-05-23 13:38:20 +00:00
micha
7f2a257102 + heap manager now per thread, reduce heap lock contention
+ heap threading test

git-svn-id: trunk@7407 -
2007-05-20 20:58:12 +00:00
micha
6ec55d2e74 * fix heap mutex deadlock in case of runtime error within heap management (needs recursive heap mutex)
git-svn-id: trunk@7337 -
2007-05-14 21:09:16 +00:00
marco
8991b8f365 * new socketerror scheme. OS/2 and netware are now broken and still must be done. (merge me and all previous socket related commits please)
git-svn-id: trunk@7327 -
2007-05-13 18:30:24 +00:00
marco
11bda8f5f2 * fpexeclpe
git-svn-id: trunk@7309 -
2007-05-11 15:08:38 +00:00
marco
e074f9383c * typo corrected
git-svn-id: trunk@7271 -
2007-05-05 10:19:44 +00:00