Sponsored Content
Top Forums Programming how to write codes "parbegin(p1,p2)" ? Post 101011 by zhshqzyc on Friday 3rd of March 2006 07:59:06 AM
Old 03-03-2006
I am going to implement Dekker's algorithm to guarantee mutex exclusion between P1 and P2.


Code:
void p1()
     {
         "Dekker's algorithm ..."
     }

void p2()
    {
         "Dekker's algorithm ..."
    } 


   void main()
  {
      parbegin(p1,p2);
       ...
  }

Should I use "fork" or others?

Thanks!
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

communicating wth another user aside from "wall" and "write"

Hi, Can anyone suggest a Unix command or c-shell algorithm to simulate to behavior of "wall" command minus the "all users"? What I'm trying to do is to send a notice to just one particular user but i dont want other remotely-logged-on users to receive the message (on the pseudo-terminals). I... (6 Replies)
Discussion started by: Deanne
6 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Problems with "write" and "wall"

Hello, I am using VirtualBox to simulate a small network with two Linux computers, the host is Mac OS X. My problem is that I can't send "write" and "wall" messages from the host to one of those Linux computers. Here is what works: - The virtual Linux computer answers "ping" messages that have... (5 Replies)
Discussion started by: 123_abc
5 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

8. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
SoGLLinePatternElement(3)					       Coin						 SoGLLinePatternElement(3)

NAME
SoGLLinePatternElement - The SoGLLinePatternElement class is yet to be documented. FIXME: write doc. SYNOPSIS
#include <Inventor/elements/SoGLLinePatternElement.h> Inherits SoLinePatternElement. Public Member Functions virtual void init (SoState *state) FIXME: write doc. virtual void push (SoState *state) FIXME: write doc. virtual void pop (SoState *state, const SoElement *prevTopElement) FIXME: write doc. Static Public Member Functions static SoType getClassTypeId (void) static int getClassStackIndex (void) static void * createInstance (void) static void initClass (void) Protected Member Functions virtual ~SoGLLinePatternElement () virtual void setElt (int32_t pattern) FIXME: write doc. Additional Inherited Members Detailed Description The SoGLLinePatternElement class is yet to be documented. FIXME: write doc. Constructor &; Destructor Documentation SoGLLinePatternElement::~SoGLLinePatternElement (void) [protected], [virtual] The destructor. Member Function Documentation SoType SoGLLinePatternElement::getClassTypeId (void) [static] This static method returns the class type. Reimplemented from SoLinePatternElement. int SoGLLinePatternElement::getClassStackIndex (void) [static] This static method returns the state stack index for the class. Reimplemented from SoLinePatternElement. void * SoGLLinePatternElement::createInstance (void) [static] This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. Reimplemented from SoLinePatternElement. void SoGLLinePatternElement::initClass (void) [static] This static method initializes static data for the SoGLLinePatternElement class. Reimplemented from SoLinePatternElement. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SoGLLinePatternElement(3)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy