7.16.5 Loading of interfaces
Page 276 of 800 |
| Search internet |
A machine executes

as follows:
- Find the reference r and index i of the lgcio request.
- Compute the RIPEMD-160 hash code of lgcio-interface. The RIPEMD code happens to be 521FC2292E93F16E6364E9EB6DF851F393BB2A50.
- Look up 521FC2292E93F16E6364E9EB6DF851F393BB2A50.so in the dll directory. If not found, store lgcio-interface to 521FC2292E93F16E6364E9EB6DF851F393BB2A50.c in the dll directory and compile it into 521FC2292E93F16E6364E9EB6DF851F393BB2A50.so.
- Load 521FC2292E93F16E6364E9EB6DF851F393BB2A50.so using dlopen(), get a pointer to the trigger function using dlsym, and associate the trigger function to the reference r and index i of the lgcio request.
After loading, the .c and .so files are left in the dll directory. Hence, an interface is only compiled first time it is used.
If the dll directory grows too big, just delete it. The .c and .so files in it will be regenerated as needed.
If you write a new interface and if compilation fails, cd to the dll directory and try recompiling the .c file which causes trouble. Logiweb machines use the following command for compiling the lgcio-interface:
gcc -x c -pipe 521FC2292E93F16E6364E9EB6DF851F393BB2A50.c \
-fPIC -shared -Wl,-soname,dl.so \
-o 521FC2292E93F16E6364E9EB6DF851F393BB2A50.so
Page 276 of 800 |
| Search logiweb.eu |
Copyright © 2010
Klaus Grue,
GRD-2010-01-05