Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fetchi(2) [bsd man page]

FETCHI(2)							System Calls Manual							 FETCHI(2)

NAME
fetchi - fetch from user instruction space (2BSD) SYNOPSIS
fetchi(addr) int *addr; DESCRIPTION
Fetchi fetches the word at addr from the caller's instruction space. This system call is required on PDP-11's with separate instruction and data spaces because the mfpi instruction reads from D-space if the current and previous modes in the program status word are both user. RETURN VALUE
Upon successful completion the contents of the caller's instruction space at addr are returned. Otherwise, a value of -1 is returned. ERRORS
[EINVAL] The kernel has not been compiled for a processor with separate I/D. [EFAULT] Addr points to an address not in the process's allocated instruction space. BUGS
The error indication, -1, is a legitimate function value; errno, (see intro(2)), can be used to disambiguate. Fetchi is a kludge and exists only to circumvent an alleged security feature on some DEC PDP-11 processors. Fetchi is unique to the PDP-11 and 2BSD; its use is discouraged. 3rd Berkeley Distribution January 22, 1987 FETCHI(2)

Check Out this Related Man Page

sync_instruction_memory(3C)				   Standard C Library Functions 			       sync_instruction_memory(3C)

NAME
sync_instruction_memory - make modified instructions executable SYNOPSIS
void sync_instruction_memory(caddr_t addr, int len); DESCRIPTION
The sync_instruction_memory() function performs whatever steps are required to make instructions modified by a program executable. Some processor architectures, including some SPARC processors, have separate and independent instruction and data caches which are not kept consistent by hardware. For example, if the instruction cache contains an instruction from some address and the program then stores a new instruction at that address, the new instruction may not be immediately visible to the instruction fetch mechanism. Software must explicitly invalidate the instruction cache entries for new or changed mappings of pages that might contain executable instructions. The sync_instruction_memory() function performs this function, and/or any other functions needed to make modified instructions between addr and addr+len visible. A program should call sync_instruction_memory() after modifying instructions and before executing them. On processors with unified caches (one cache for both instructions and data) and pipelines which are flushed by a branch instruction, such as the x86 architecture, the function may do nothing and just return. The changes are immediately visible to the thread calling sync_instruction_memory() when the call returns, even if the thread should migrate to another processor during or after the call. The changes become visible to other threads in the same manner that stores do; that is, they eventually become visible, but the latency is implementation-dependent. The result of executing sync_instruction_memory() are unpredictable if addr through addr+len-1 are not valid for the address space of the program making the call. RETURN VALUES
No values are returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 12 Feb 1997 sync_instruction_memory(3C)
Man Page

14 More Discussions You Might Find Interesting

1. Solaris

Problems fetching EMC disks to Solaris OS.

Hi, I have a nasty little problem with my disks on my system My system configuration is as follows Sunv890 with sunos 9 connected tot a IBM6800 SAN using a 2port 2 GB qla2342 adapter. We have bought a EMC SAN. The company who sold us the san, said that it would be no problem connecting the... (10 Replies)
Discussion started by: orac
10 Replies

2. Shell Programming and Scripting

Extracting fetching values

I have a file like this ############################################ # ParentFolder Flag SubFolders Colateral 1 Source1/Checksum CVA 1 Source1/Checksum Test 1 VaR/Checksum Test2 1 SVaR/Checksum FX 1 ... (6 Replies)
Discussion started by: manas_ranjan
6 Replies

3. Shell Programming and Scripting

Fetching a set of lines with start and end

Hi Folks, Need help in fetching a group of lines with a start and end strings. Example is shown below. start#morning tea jog breakfast end start#afternoon lunch work chat end start#evening snacks tea chat (6 Replies)
Discussion started by: jayadanabalan
6 Replies

4. UNIX for Advanced & Expert Users

su option is not fetching the password

Hi, Please find the below code. function ABC { echo "Enter Element Name:" read ename echo "Enter Element Source path:" read spath echo "Enter Element Destination path:" read dpath echo "cp -p $spath/$ename $dpath/$ename" echo... (8 Replies)
Discussion started by: gthangav
8 Replies

5. Shell Programming and Scripting

[Solved] Fetching logs of last few days from logfile

Hi All, I have a requirement to fetch logs of last 'N' days. I am trying the following command which is working fine if it finds the date of that day in logfile. START=`TZ="GMT+$((24*N))" date +"%Y %b %d"` this is being used to fetch 'N'th day's date and awk '/'"$START"'/{p=1}... (24 Replies)
Discussion started by: KDMishra
24 Replies

6. Shell Programming and Scripting

KSH fetching files from server A onto server B and putting on server C

Dear Friends, Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field. Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task... (8 Replies)
Discussion started by: BrownBob
8 Replies

7. Shell Programming and Scripting

Fetching record based on Uniq Key from huge file.

Hi i want to fetch 100k record from a file which is looking like as below. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ... (17 Replies)
Discussion started by: lathigara
17 Replies

8. Shell Programming and Scripting

Fetching variable from config file

I am using . .profile in my script below I want to fech it it from my configuration file .id_pass_file.txt(it has all user_name and passwords) how can i do this PROFILE_PATH=. .profile AND IN MY SCRIPT $PROFILE_PATH IS THIS CORRECT #!/bin/sh ORACLE_HOME=/var/opt/oracle/product/10g;... (8 Replies)
Discussion started by: rafa_fed2
8 Replies

9. Shell Programming and Scripting

Fetching columns from .csv file except last column

Hi, i have below list of files so i just want the name of the files in one parameter and not the timestamp. i want only GIDW_Dy_Tm_Seg_Sls_legacy_PL_0_0_ in variable of all files. GIDW_Dy_Tm_Seg_Sls_legacy_PL_0_0_20131001101800.csv GIDW_Dly_Sls_legacy_RO_0_0_20131001172001.csv ... (9 Replies)
Discussion started by: renuk
9 Replies

10. Shell Programming and Scripting

Fetching values in CSV file based on column name

input.csv: Field1,Field2,Field3,Field4,Field4 abc ,123 ,xyz ,000 ,pqr mno ,123 ,dfr ,111 ,bbb output: Field2,Field4 123 ,000 123 ,111 how to fetch the values of Field4 where Field2='123' I don't want to fetch the values based on column position. Instead want to... (10 Replies)
Discussion started by: bharathbangalor
10 Replies

11. Shell Programming and Scripting

Help with fetching the data from remote machine from my jumpbox(local machine)

Team, Presently i am running a script from my local box(i.e jumpbox) to all the remote machines.Basically fetching basic queries like pwd,mkdir,touch etc and i am able to successfully fetch it from my local machine.But when i want to check certain database related queries like the dbstat... (20 Replies)
Discussion started by: whizkidash
20 Replies

12. Shell Programming and Scripting

Fetching a line matching a pattern

Hi Gurus, I have a file as follows (Sample shown below but the list is very huge) SCHEDULE WS1#JS1 RUNCYCLE1 : WS1#JOB1 WS1#JOB2 FOLLOWS JOB1 END SCHEDULE WS2#JS1 RUNCYCLE2 : WS1#JOB3 WS1#JOB1 FOLLOWS JOB3 WS2#JOB1 (10 Replies)
Discussion started by: jayadanabalan
10 Replies

13. UNIX for Beginners Questions & Answers

Fetching 1st Column and Last n Columns

I am trying to fetch 1st column and last 10 columns.The code I am using is working fine but after using the code then output file becomes space delimited not tab delimited. awk 'BEGIN {OFS="\t"}{printf("%s\t",$1)}{for(i=NF-9; i<=NF; i++) {printf("%s\t",$i)};printf "\n" } ' inputfile ... (11 Replies)
Discussion started by: Nina2910
11 Replies

14. UNIX for Beginners Questions & Answers

Fetching address and user details from log file

Hi All, I have a requirement to get the address values from a large log file along with the user details. line1,line2,city,stateCode,postalCode,countryCode. The below code as advised in the earlier post is giving the user data zgrep -B1 "Failed to calculate Tax" log.2018-05-23.gz | grep... (8 Replies)
Discussion started by: nextStep
8 Replies