From owner-freebsd-hackers Sun Aug 10 21:49:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA10738 for hackers-outgoing; Sun, 10 Aug 1997 21:49:45 -0700 (PDT) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA10733 for ; Sun, 10 Aug 1997 21:49:42 -0700 (PDT) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.7/8.8.5) with ESMTP id VAA12027; Sun, 10 Aug 1997 21:49:38 -0700 (PDT) Message-Id: <199708110449.VAA12027@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Paul Southworth cc: freebsd-hackers@FreeBSD.ORG Subject: Re: MySQL using FreeBSD native threads (3.0) In-reply-to: Your message of "Sun, 10 Aug 1997 09:26:45 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Aug 1997 21:49:38 -0700 From: Amancio Hasty Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, I will review the thread library with respect to all the patches that I have which are mostly what John mail me and will post patches later on this week. Do threads in FreeBSD work? Yeap , however we need to upgrade it. Here are tests runs from the ACE library which was compiled with pthread support and the tests do use threads. {root} ./run_tests.sh Starting tests... running TSS_Test running Time_Value_Test running SString_Test running Naming_Test running Handle_Set_Test running Mem_Map_Test running SV_Shared_Memory_Test running MM_Shared_Memory_Test running Mutex_Test running Timer_Queue_Test running Task_Test running Thread_Manager_Test running Thread_Pool_Test running Future_Test running Reactors_Test running Reactor_Exceptions_Test C++ exceptions not supported on this platform running Reactor_Notify_Test running Reactor_Timer_Test running Reader_Writer_Test running SOCK_Test running Conn_Test running SPIPE_Test SPIPE is not supported on this platform running UPIPE_SAP_Test threads and/or UPIPE not supported on this platform running Barrier_Test running Buffer_Stream_Test ACE_ASSERT: file Buffer_Stream_Test.cpp, line 185 assertion failed for 'result == -1 && errno == EWOULDBLOCK'. [: -/: expected integer Error in log file no line with Ending ACE_ASSERT: file Buffer_Stream_Test.cpp, line 185 assertion failed for 'result == -1 && errno == EWOULDBLOCK'. running Priority_Buffer_Test running Recursive_Mutex_Test running Time_Service_Test [: -/: expected integer Error in log file no line with Ending running Tokens_Test [: -/: expected integer Error in log file no line with Ending running Map_Manager_Test running Message_Queue_Test running Message_Block_Test running Pipe_Test running Process_Mutex_Test running Process_Strategy_Test running Service_Config_Test running Priority_Task_Test running IOStream_Test Tests complete... The couple of EWOULDBLOCK errors have been fixed in the old patched libc_r . Enjoy, Amancio >From The Desk Of Paul Southworth : > On Wed, 6 Aug 1997, Amancio Hasty wrote: > > :Care to just post the questions? > > These were sent to jb@cimlogic.com.au but that address bounces now (a > couple weeks ago it worked, but the mailhost there has been unreachable > for a week or so). > > If you have any answers to these, please copy me since I do not subscribe > to the hackers list currently. > > The questions below refer to porting MySQL to use FreeBSD native threads; > the work is being done using the 3.0-970618-SNAP release. > > 1) There isn't a sched.h file. pthread.h have prototypes for some functions > that uses sched_param but it's a little problem to use them now :) > > 2) I looked into /usr/src/lib/libc_r/uthread/pthread_priv.h and found > the following: > > ---- > struct sched_param { > int prio; /* Should be named sched_priority */ > void *no_data; > }; > > enum schedparam_policy { > SCHED_RR, > SCHED_IO, > SCHED_FIFO, > SCHED_OTHER > }; > ---- > > Shouldn't this be in a sched.h file ? > It would also be nice if 'prio' would be renamed 'sched_priority'. I > think this is the standard slot name (at least all other pthread > implementation uses this) > > 3) The following functions are not defined: > pthread_setprio(), pthread_attr_setprio(),pthread_attr_setscope() > > When do you think these will be available? > > 4) I have now fixed workarounds for the above cases. All code compiles > and links clean but when run a test program, pthread_create doesn't > start a thread. Should threads work at all in FreeBSD 3.0 ? >