Sponsored Content
Full Discussion: C function call dynamically
Top Forums Programming C function call dynamically Post 302379369 by DreamWarrior on Thursday 10th of December 2009 01:42:28 PM
Old 12-10-2009
Just as a note, I did some quick tinkering and it appears the stack frame for Linux (probably ia32 in general) stores the parameters in the stack frame of the callee. So, in contrast to AIX, coding your generic thrower in Linux will require you to allocate a brand new stack frame, put all the arguments in it, configure it correctly to call the procedure, and fire it off. Non-trivial at best.

Having no experience with the reflection library, I don't know if it can be used to build dynamic calls. If so, great.... But, I have my doubts.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

function call

can I call a function in bash script just as in C++ while do function() done function() thanks, Steffen (3 Replies)
Discussion started by: forever_49ers
3 Replies

2. Programming

Help with a function call

Hi, Can anyone help me figure out the problem I'm having with a function call? I have a header file, which sets an enum: typedef enum {INFO, WARNING, FATAL} Levels; int log_event (Levels, char *fmt, ...); ..then the function is called this way: log_event(INFO, "Message text"); ... (6 Replies)
Discussion started by: Stevhp
6 Replies

3. Shell Programming and Scripting

call function

I have a function check_ok in my abc.sh. which return me 1 or 0 . I want to call this fuction through other shell script. this shell also send two parameter to calling function. Can you please tell me how. I am very new in unix. #!/bin/bash date_equal() { sqlplus -silent... (4 Replies)
Discussion started by: Jamil Qadir
4 Replies

4. Shell Programming and Scripting

help on function call

hello, when i call function inside awk traitement it doesn't work, i don't have error execution but i don't get result and if i call the function outside awk traitement it work well.. there's something special in awk call function?? here is the example : awk -F "," '{ {first=$1; sec=$2;... (3 Replies)
Discussion started by: kamel.seg
3 Replies

5. Shell Programming and Scripting

Function Call

How we can start a process if doesn't exists before? (1 Reply)
Discussion started by: Zaxon
1 Replies

6. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

7. Shell Programming and Scripting

Function call

Hi foiks i am unable to find what is wrong in my code mu functionality is to exit from shell when i give 99 but it is not calling function ext Could you please correct me. read option if ; then ext else echo "out" fi function ext { echo "tested 99 and exit... (12 Replies)
Discussion started by: kojo
12 Replies

8. Shell Programming and Scripting

After exit from function it should not call other function

Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this? iNOUT i AM GIVING TO THE... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

9. Shell Programming and Scripting

How to dynamically name as function in shell?

Hi all, Does anyone know if it possible to append a parameter to a function name? Something like the following: function tnsrec_${SERVICE_NAME} { code.. } Any ideas? (6 Replies)
Discussion started by: jonnyd
6 Replies

10. Homework & Coursework Questions

How to Dynamically Pass Parameter to plsql Function & Capture its Output Value in a Shell Variable?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: 2. Relevant commands, code, scripts, algorithms: #! /bin/ksh v="ORG_ID" ... (2 Replies)
Discussion started by: sujitdas2104
2 Replies
BADADDR(9r)															       BADADDR(9r)

NAME
BADADDR - General: Probes the address during device autoconfiguration SYNOPSIS
int BADADDR( caddr_t addr, int length, struct bus_ctlr_common *ptr ); ARGUMENTS
Specifies the address of the device registers or memory. Specifies the length (in bytes) of the data to be checked. Valid values are 1, 2, and 4 on 32-bit machines and 4 and 8 on 64-bit machines. Specifies a pointer to a bus_ctlr_common structure. You cast this argument as a pointer to either a bus or controller structure. DESCRIPTION
The BADADDR routine generates a call to a machine-dependent routine that does a read access check of the data at the supplied address and dismisses any machine check exception that may result from the attempted access. You call this routine to probe for memory or I/O devices at a specified address during device autoconfiguration. NOTES
You can use BADADDR in device drivers that are statically configured into the kernel. However, you cannot use BADADDR if the driver is dynamically configured into the kernel. If you implement the driver to be both statically and dynamically configured, you can declare a variable and use it to control the call to BADADDR. The following code fragment shows the use of such a variable used in the probe routine for the /dev/none driver: . . . if (none_is_dynamic) { /* Code to handle tasks associated with a dynamically * * configured driver */ . . . } else { /* Code to handle tasks (including the call to BADADDR) * * associated with a statically configured driver * * including call to BADADDR */ } . . . The EISA and ISA buses do not generate a machine check when BADADDR performs a read access to a nonexistent location. These buses always return success when BADADDR performs a read access to their address space. For the PCI bus and the VMEbus, you must do the following before calling BADADDR: Call the iohandle_to_phys routine to convert the I/O han- dle to a valid system physical address Call the PHYS_TO_KSEG routine to convert the valid system physical address to a kernel-unmapped vir- tual address Call the BADADDR routine, passing this kernel-unmapped virtual address as the first argument RETURN VALUES
The BADADDR routine returns the value 0 (zero) if the data is accessible or a nonzero value if the data is not accessible. BADADDR(9r)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy