home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.isis
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!honir!rcbc
- From: rcbc@honir.cs.cornell.edu (Robert Cooper)
- Subject: Re: ISIS3.0 and C++
- In-Reply-To: adc@tardis.msu.edu's message of Tue, 8 Sep 92 01:17:40 GMT
- Message-ID: <RCBC.92Sep8151749@honir.cs.cornell.edu>
- Sender: rcbc@cs.cornell.edu (Robert Cooper)
- Reply-To: rcbc@cs.cornell.edu
- Organization: Cornell Univ. CS Dept, Ithaca NY 14853
- References: <1992Sep8.011740.2412@msuinfo.cl.msu.edu>
- Date: Tue, 8 Sep 1992 20:17:49 GMT
- Lines: 31
-
- In article <1992Sep8.011740.2412@msuinfo.cl.msu.edu> adc@tardis.msu.edu (Alan D. Cabrera) writes:
-
- I'm registering some routines in C++ with isis_task and it seems that I
- must cast the routines to F570810ac. Am I doing something wrong? I'd
- like to use something more mnemonic.
-
- If you cast the parameter as a void (*)(void *) you should be OK.
- E.g.
-
- isis_task(void (*foobar)(void *), "foobar")
-
- A shorthard typedef for this function type is declared isis.h but
- unfortunately the typedef's name "v_routine_vs" was accidentally obscured
- by our obscurifier, to become the highly mnemonic "F570810ac". We'll fix
- this in the next release.
-
- An alternative to casting the isis_task call (and the t_fork call as well)
- is to declare the function itself with the types that isis_task expects:
-
- void foobar (void *arg_void) {
- wombat *arg = arg_void;
- ....
- }
-
- ...and then cast the void * argument to whatever type was actually passed
- in. Most optimizing compilers won't create an extra variable or any extra
- code for this example.
-
- -- Robert Cooper
- --
- --
-