02-27-2006
Thanks eugrus!
Can you or anyone elaborate, on 32-bit/64-bit OS.
As a programmer, how is it going to make any difference?
If I develop a software on 64 bit OS, will it run on 32 bit OS? Do I really need to worry about this while developing any application?
Please let me know if I am deviating the topic, I can open a new thread.
Thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need the Unix operating system on disc as im new to unix. Im studying unix and x windows next year at Sheffield University and would like to get a head start.
Any suggestions would be appreciated (2 Replies)
Discussion started by: jeffersno1
2 Replies
2. UNIX for Dummies Questions & Answers
hi
I am trying to install solaris 8 on intel machine(intel300 mhz,32 mg ram,3.2 hd,24x cd-rom). hardware scaning is ok. Then it ask to enter choice for interactive installation #1 for web #2. After i enter chice system reboot agian and it takes to same screne.
... (1 Reply)
Discussion started by: neer45
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I recently joined this forum and new to UNIX.
Is there any difference between UNIX operating system and UNIX open server? Please explain. (1 Reply)
Discussion started by: Manjit
1 Replies
4. UNIX for Dummies Questions & Answers
Hello Everyone,
I'm new to this forum and Unix. I have a couple of questions and please, excuse my ignorance.
I have a spare machine which is now running MS Windows 98 and I would like to format the disk and install the Unix operating system along with Oracle 8i and SQL Server.
My... (13 Replies)
Discussion started by: IronBear
13 Replies
5. News, Links, Events and Announcements
Excellent reference on the history of UNIX:
Bell Labs History of UNIX*
http://www.bell-labs.com/history/unix/images/86-300838-EM.jpeg (0 Replies)
Discussion started by: Neo
0 Replies
6. UNIX for Dummies Questions & Answers
Can anyone give me info on networking features of the Unix Operating System please.
Thanks in advance (1 Reply)
Discussion started by: WaveZero
1 Replies
7. UNIX for Dummies Questions & Answers
Hey all, I currently use FreeBSD and linux and have decided I want to use a proper Unix distrobution. Which Unix distro would you members recommend. The only requirments that I have is that I can use some pogramming utilities available. I don't mind the install process. One more thing, I know some... (2 Replies)
Discussion started by: -zorin
2 Replies
8. Linux
How to check the Linux operating System bit version i.e if the operating system is 32-bit verison or 64-bit verison?
There is a file which gives this information, i think it is in /usr/bin or /usr/sbin. I am not sure about this? This Might be a silly question, but it is important.
;) (7 Replies)
Discussion started by: sasiharshav
7 Replies
9. Programming
I have a query that is about android application based mobile. actually android is so popular in mobiles and its w using sell cmd also UNIX is also support shell files. So it is a operating system of UNIX. But i am not sure please help me. (5 Replies)
Discussion started by: andrepitt77
5 Replies
10. UNIX for Dummies Questions & Answers
Which is the smallest Unix operating system and how do I download it?
edit by bakunin: corrected typo in the thread-title and removed the text formatting: we are able to read non-bold text either. (4 Replies)
Discussion started by: Nalcolmshally
4 Replies
LEARN ABOUT CENTOS
ddi_model_convert_from
ddi_model_convert_from(9F) Kernel Functions for Drivers ddi_model_convert_from(9F)
NAME
ddi_model_convert_from - determine data model type mismatch
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
uint_tddi_model_convert_from(uint_t model);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
model The data model type of the current thread.
DESCRIPTION
ddi_model_convert_from() is used to determine if the current thread uses a different C Language Type Model than the device driver. The
64-bit version of Solaris will require a 64-bit kernel to support both 64-bit and 32-bit user mode programs. The difference between a
32-bit program and a 64-bit program is in its C Language Type Model: a 32-bit program is ILP32 (integer, longs, and pointers are 32-bit)
and a 64-bit program is LP64 (longs and pointers are 64-bit). There are a number of driver entry points such as ioctl(9E) and mmap(9E)
where it is necessary to identify the C Language Type Model of the user-mode originator of an kernel event. For example any data which
flows between programs and the device driver or vice versa need to be identical in format. A 64-bit device driver may need to modify the
format of the data before sending it to a 32-bit application. ddi_model_convert_from() is used to determine if data that is passed between
the device driver and the application requires reformatting to any non-native data model.
RETURN VALUES
DDI_MODEL_ILP32 A conversion to/from ILP32 is necessary.
DDI_MODEL_NONE No conversion is necessary. Current thread and driver use the same data model.
CONTEXT
ddi_model_convert_from() can be called from any context.
EXAMPLES
Example 1: : Using ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications.
The following is an example how to use ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications.
struct passargs32 {
int len;
caddr32_t addr;
};
struct passargs {
int len;
caddr_t addr;
};
xxioctl(dev_t dev, int cmd, intptr_t arg, int mode,
cred_t *credp, int *rvalp) {
struct passargs pa;
switch (ddi_model_convert_from(mode & FMODELS)) {
case DDI_MODEL_ILP32:
{
struct passargs32 pa32;
ddi_copyin(arg, &pa32, sizeof (struct passargs32), mode);
pa.len = pa32.len;
pa.address = pa32.address;
break;
}
case DDI_MODEL_NONE:
ddi_copyin(arg, &pa, sizeof (struct passargs), mode);
break;
}
do_ioctl(&pa);
....
}
SEE ALSO
ioctl(9E), mmap(9E), ddi_mmap_get_model(9F)
Writing Device Drivers
SunOS 5.10 8 Feb 2001 ddi_model_convert_from(9F)