ccall_create
Prev | 2.1. ccall.h | Next

## Name

ccall_create — Inter C module calling wrapper.

## Synopsis

``extern int ccall_create`(void** dest, void* call, void* pw);`

## Arguments

`dest` Pointer to a void CVS Makefile Makefile.~1.10.~ ben.txt capi entities fo fop host html html-ref ref refbook.xml refbook.xml.bak refbook.xml.~1.2.~ rel-20jun2002.txt report.txt set.ced swiapi usb-doc-allset.html.tar.gz usb-doc-refset.html.tar.gz usb.ced usb.pdf.gz usb.xml usb.xml.bak usb.xml.~1.6.~ user to place the result.
`call` Function to be called through this.
`pw` The private word to get the proper workspace for the call.

## Description

Inter C module calling wrapper

ccall_create makes a small piece of code so that one module's C code can call another, or an external caller can enter the C code with the correct workspace setup.

There are a number of limitations: - variable argument functions are not supported - you can only pass 4 registers worth of arguments through - the calling mode must be SVC

the space for the code-segment is currently allocated out of the RMA, and as such, should be freed after the user has done with it.

An example piece of code, where my_example_routine needs to be called by another piece of C...

void *example_entry; void *my_pw; int my_example_routine(args); void init_entry(void) { ccall_create(&example_entry, my_example_routine, my_pw) } void fini_entry(void) { ccall_free(&example_entry); }

Prev | Up | Next
Chapter 2. usb/sys | Home | ccall_free