Re: [WINEALSA] Add Midi IN support (take 3)
Christian Costa <titan.costa(a)wanadoo.fr> writes:
+static int npfd; +static int pfd_array_size = 0; +static struct pollfd *pfd = NULL;
This isn't thread-safe. Why don't you simply allocate the array in the function and free it when you are done? -- Alexandre Julliard julliard(a)winehq.com
Alexandre Julliard wrote:
Christian Costa <titan.costa(a)wanadoo.fr> writes:
+static int npfd; +static int pfd_array_size = 0; +static struct pollfd *pfd = NULL;
This isn't thread-safe.
The function that uses them is a timer callback.
Why don't you simply allocate the array in the function and free it when you are done?
Well, I intended, in later patches, to update the poll fds when opening or closing devices and thus avoid the retreival of poll fds each time. But well, I can accomodate with your proposal at this for the moment since I don't known if this is usefull. Bye, Christian
Christian Costa <titan.costa(a)wanadoo.fr> writes:
Alexandre Julliard wrote:
This isn't thread-safe.
The function that uses them is a timer callback.
You are right, this doesn't matter then.
Well, I intended, in later patches, to update the poll fds when opening or closing devices and thus avoid the retreival of poll fds each time. But well, I can accomodate with your proposal at this for the moment since I don't known if this is usefull.
If you are planning to change it then that's fine, I can put it in as is. But if you are not sure, then it would be better to put in a fixed version for now. -- Alexandre Julliard julliard(a)winehq.com
participants (2)
-
Alexandre Julliard -
Christian Costa