Sponsored Content
Full Discussion: Register variables
Top Forums Programming Register variables Post 30654 by Vishnu on Thursday 24th of October 2002 08:59:24 PM
Old 10-24-2002
When to use register variables?

Hi,

I never clearly understood when to use the keyword "register", I just know that it is a request to the system to provide space for this object in the CPU registers, which are faster in accessing than RAM.

Can anyone provide me a small practical situation where it becomes imperative to use the keyword "register"?

I would also appreciate if someone suggests me a good book which emphasizes the use of registers.

I have searched the forums and found this thread

https://www.unix.com/programming/6334-register-variables.html?s=

but it didn't answer my question - in which situations do we use them? I have seen industry strength C programs written by experts, which chose certain variables to be registers while declaring others as normal types, but couldn't quite appreciate why certain variable need to be a register.

Thank you!
Vishnu.
 

9 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Can't register

I tried registering, but no matter what email address I provide, it says not a valid address and not the same in confirm. I tried many times, but no go. I thought I had already registered as Sully but even that didn't like my email address for password info. Of course, that could be someone else... (2 Replies)
Discussion started by: Not registered
2 Replies

2. Forum Support Area for Unregistered Users & Account Problems

Not able to register

I tried my best to register myself on unix.com but i am not lucky, can you pls give me instruction. (1 Reply)
Discussion started by: Kuldeep_Sngh333
1 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Cant register

Registration denied. Sorry, The UNIX and Linux Forums runs an active policy of not allowing spammers. Please contact us via by posting in this forum if you believe this is in error What's with this? Tried 2 email accounts in case your forum blocks either. (1 Reply)
Discussion started by: Diagonal
1 Replies

4. Forum Support Area for Unregistered Users & Account Problems

Can not register

I need help from the scripting threads and want to register. I tried it several times, but I was all the time rejected, because of your spam policy. I do what you have written, but I wasn't still able to register. (1 Reply)
Discussion started by: ScAr
1 Replies

5. Forum Support Area for Unregistered Users & Account Problems

I can't register

Hello admin, I come from Vietnam, it's in blocked country list. Can you help me to register I want to register with following information: Username: bojankikrick Email: <removed> Thanks very much! (1 Reply)
Discussion started by: Unregistered
1 Replies

6. Forum Support Area for Unregistered Users & Account Problems

Can't register

I am in China. China is in the blocked country list. I can't register. And I don't have a static ip. Can u help me to fix it. I want to register with following information: Username:liuchengzhang email:<removed> Thanks! (1 Reply)
Discussion started by: liuchengzhang
1 Replies

7. Forum Support Area for Unregistered Users & Account Problems

Cannot able to Register!

Hi Admin, I am unable to register . Request you to help me in getting my registration done. Name: Raghavendra Kulkarni Mail id : <removed> Thanking you in advance for your support. (1 Reply)
Discussion started by: Unregistered
1 Replies

8. Forum Support Area for Unregistered Users & Account Problems

Not able to register

Hi Admin, Currently, i am not able to register in this site. Kindly let me know what need to done. Thanks, ramesh (1 Reply)
Discussion started by: Unregistered
1 Replies

9. Forum Support Area for Unregistered Users & Account Problems

I can not register

I want to register as "nezabudka", but I can't and I have a dynamic ip address. My country is not in the list of restrictions. I'm alive, I'm not a bot ))) (3 Replies)
Discussion started by: nezabudka
3 Replies
ddi_dev_regsize(9F)					   Kernel Functions for Drivers 				       ddi_dev_regsize(9F)

NAME
ddi_dev_regsize - return the size of a device's register SYNOPSIS
#include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_dev_regsize(dev_info_t *dip, uint_t rnumber, off_t *resultp); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
dip A pointer to the device's dev_info structure. rnumber The ordinal register number. Device registers are associated with a dev_info and are enumerated in arbitrary sets from 0 on up. The number of registers a device has can be determined from a call to ddi_dev_nregs(9F). resultp Pointer to an integer that holds the size, in bytes, of the described register (if it exists). DESCRIPTION
The ddi_dev_regsize() function returns the size, in bytes, of the device register specified by dip and rnumber. This is useful when, for example, one of the registers is a frame buffer with a varying size known only to its proms. RETURN VALUES
The ddi_dev_regsize() function returns: DDI_SUCCESS A successful return. The size, in bytes, of the specified register, is set in resultp. DDI_FAILURE An invalid (nonexistent) register number was specified. CONTEXT
The ddi_dev_regsize() function can be called from user, interrupt, or kernel context. SEE ALSO
ddi_dev_nintrs(9F), ddi_dev_nregs(9F) Writing Device Drivers SunOS 5.11 16 Jan 2006 ddi_dev_regsize(9F)
All times are GMT -4. The time now is 06:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy