Changeset 5312:27ec111dc8c5 in roaraudio for include


Ignore:
Timestamp:
11/30/11 01:05:41 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support for seperate contextes for roardl/plugins. Currently incudes error state and a global per handle data segment. This does not work for statically linked librarys (yet). support for per-context notify core needs to be added/completed.

Location:
include/libroar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/error.h

    r5286 r5312  
    113113void   roar_err_to_errno(void); 
    114114 
     115// Resets the stored state to 'no error' state. This can be used 
     116// to init the state. 
     117int    roar_err_initstore(struct roar_error_state * state); 
     118 
    115119// store a error state (both libroar and system) 
    116120// returnes the error or ROAR_ERROR_NONE on success so it does not alter gloabl error state. 
  • include/libroar/roardl.h

    r5275 r5312  
    148148 int    (*func[ROAR_DL_FN_MAX])(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib); 
    149149 struct roar_dl_libraryname * libname; 
     150 size_t  global_data_len; 
     151 void *  global_data_init; 
     152 void ** global_data_pointer; 
    150153}; 
    151154 
     155// parameter functions: 
    152156struct roar_dl_librarypara * roar_dl_para_new(const char * args, void * binargv, 
    153157                                              const char * appname, const char * abiversion); 
     
    157161                                         const char * appname, const char * abiversion); 
    158162 
     163// 'core' dynamic loader functions. 
    159164struct roar_dl_lhandle * roar_dl_open   (const char * filename, int flags, 
    160165                                         int ra_init, struct roar_dl_librarypara * para); 
     
    169174const char *             roar_dl_errstr (struct roar_dl_lhandle * lhandle); 
    170175 
     176// getting meta data: 
    171177struct roar_dl_librarypara       * roar_dl_getpara(struct roar_dl_lhandle * lhandle); 
    172178const struct roar_dl_libraryname * roar_dl_getlibname(struct roar_dl_lhandle * lhandle); 
     179 
     180// context switching: 
     181// _restore() is to switch from main to library context. _store() is to store library context 
     182// and switch back to main context. 
     183int                      roar_dl_context_restore(struct roar_dl_lhandle * lhandle); 
     184int                      roar_dl_context_store(struct roar_dl_lhandle * lhandle); 
    173185 
    174186#endif 
Note: See TracChangeset for help on using the changeset viewer.