Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: Tony Finch Newsgroups: comp.compilers Subject: Re: Help needed with function pointer examples Date: 19 Jan 2012 14:07:53 +0000 (GMT) Organization: dotat labs Lines: 21 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-01-037@comp.compilers> References: <12-01-006@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1326983278 74953 64.57.183.58 (19 Jan 2012 14:27:58 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Thu, 19 Jan 2012 14:27:58 +0000 (UTC) Keywords: analysis, code Posted-Date: 19 Jan 2012 09:27:57 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:436 Swati wrote: > >We are doing an analysis on the usage of function pointers. >We have considered one such example as GCC which uses function pointers. >Can you suggest any other application which uses function pointers >extensively. Function pointers are often a nice way to implement state machines, for instance http://dotat.at/cgi/git?p=unifdef.git;a=blob;f=unifdef.c The byte code in a threaded code interpreter is often just a list of function pointers. There are a lot of function pointers in the unix kernel. Have a look at Lions' commentary, Stevens' TCP/IP Illustrated volume 2, and McKusick & Neville-Neil's Design and Implementation of the FreeBSD operating system. Tony. -- f.anthony.n.finch http://dotat.at/