Re: swapcontest usage in syncio.c

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

 



Anand Avati <anand.avati@xxxxxxxxx> wrote:

> I still don't understand how/why this change will help NetBSD

It ensures swapcontext() is operates on a context obtanined by
getcontext() in the same thread. 

NetBSD considers the thread to be part of the context, and calling
swapcontext() with a context obtained from another thread will preempt
the other thread in order to execute synctask_wrap(). And here we break
because synctask_get() will not retreive the approriate task, as it was
set in thread specific storage of another thread.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@xxxxxxxxxx



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux