DragonFly BSD
DragonFly bugs List (threaded) for 2006-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Threadding issue


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Fri, 28 Jul 2006 05:20:32 +0200

YONETANI Tomokazu wrote:
			exec_t *js;
			while ((js = g_async_queue_try_pop (js_queue)))
			{
				/* spin; play_exec gets this & the GDK lock in reverse order */
				while (pthread_mutex_trylock (&widgets_update_lock))
					sched_yield ();
				pthread_mutex_unlock (&widgets_update_lock); /* JS 'play()' needs it */

ehm? are they using the event of unlocking a mutex as some kind of signaling? and why wouldn't they just use get the lock?


				engine_exec_obj (js->cmd, js->obj, js->cb, js->cb_data, js->ecb, js->src);
				free (js->cmd);
				free (js->src);
				free (js);
			}
			return TRUE;
		}

I wonder what happens if you use libthread_xu instead of libc_r
(not sure if it's easy to replace the use of pthead library).

I'm not sure how much works with libthread_xu. We're at least missing signaling bits in the kernel.


cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]