All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit Fouet <benoit.fouet@purplelabs.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: missing snd_dlclose in timer.c
Date: Tue, 25 Apr 2006 17:22:55 +0200	[thread overview]
Message-ID: <444E3ECF.4060202@purplelabs.com> (raw)
In-Reply-To: <s5hlkttzpit.wl%tiwai@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]



Takashi Iwai wrote:

>At Tue, 25 Apr 2006 16:30:08 +0200,
>Benoit Fouet wrote:
>  
>
>>Takashi Iwai wrote:
>>
>>    At Tue, 25 Apr 2006 11:03:28 +0200,
>>    Benoit Fouet wrote:
>>
>>        Hi,
>>        
>>        I worked on an ARM9E platform with not much memory. We had to
>>        dynamically link the libraries we needed.
>>        BTW I found out that there was a dlclose missing in ALSA lib in the
>>        snd_timer_open_conf function.
>>        Find below the diff of my file, if you want to add it in th hg repository.
>>
>>    A good catch.
>>    
>>    I just wonder whether it's safe to call dlclose() there.
>>    Can the callback functions dynamically registered by open
>>    (e.g. snd_timer_hw_open) be still accessed safely after dlclose()?
>>    
>>    Or should we keep dl handle and dlclose it in snd_timer_close()?
>>
>>    Takashi
>>
>>It surely is safer to keep the library opened as long as its symbol are likely to be
>>used.
>>I'm afraid I'm not aware enough of how it works to answer more clearly.
>>btw, the symbols I used were in asound library, and were consequently still reachable
>>after dlclose as the library was not really unloaded.
>>Keeping the handle must be the best way to guarantee symbols can be reached until
>>snd_timer_close.
>>    
>>
>
>I guess so, too.  alsa-lib has a mechanism to allow users specifying
>an extra shared object to be loaded.  Thus symbols are not always in
>libasound.so that is kept opened.
>
>I'll fix codes to call snd_dlclose() in close.
>
>  
>
Ok, thank you for precision :)

Ben


[-- Attachment #2: Type: text/html, Size: 1933 bytes --]

  reply	other threads:[~2006-04-25 15:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25  9:03 missing snd_dlclose in timer.c Benoit Fouet
2006-04-25 13:27 ` Takashi Iwai
2006-04-25 14:30   ` Benoit Fouet
2006-04-25 14:41     ` Takashi Iwai
2006-04-25 15:22       ` Benoit Fouet [this message]
2006-04-25 16:10         ` Takashi Iwai
2006-04-25 16:29           ` Benoit Fouet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=444E3ECF.4060202@purplelabs.com \
    --to=benoit.fouet@purplelabs.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.