Search Results

Search found 6 results on 1 pages for 'myf'.

Page 1/1 | 1 

  • kernel get stack when signalled

    - by yoavstr
    hi there i write readers and writers where the kernel have to syncronize between them and block writer who already read a massage when i am in the queue waiting I get signal so I do the fallowing while (i_Allready_Read(myf) == ALLREADY_READ || isExistWriter == false ) //while (!(i_Allready_Read(aliveProc,current->pid))) { int i, is_sig = 0; printk(KERN_INFO "\n\n*****entered set in read ******\n\n" ); if (i_Allready_Read(myf) == ALLREADY_READ ) wait_event_interruptible (readWaitQ1, !i_Allready_Read(myf)); else wait_event_interruptible (readWaitQ1, isExistWriter); //printk(KERN_INFO "Read Wakeup %d\n",current->pid); for (i = 0; i < _NSIG_WORDS && !is_sig; i++) { is_sig = current->pending.signal.sig[i] & ~current->blocked.sig[i]; } if (is_sig) { handledClose(myf); module_put (THIS_MODULE); return -EINTR; } } return 0;//success } inline void handledClose(struct file *myf)//v { /* *if we close the writer other writer *would be able to enter to permissiones */ if (myf == writerpid ) { isExistWriter = DOESNT_EXIST; //printk(KERN_INFO "procfs_close : this is pid that just closed %d \n", writerpid); } /* *else its a reader so our numofreaders *need to decremented */ else { removeFromArr(myf); numOfReaders--; } } and my close does nothing ... what did i do wrong?

    Read the article

  • forwarding my domain to ning site, vs paying for mapping. SEO value? [closed]

    - by myf
    Possible Duplicate: Could I buy a domain name to increase traffic to my site like this? hello, and thanks for your time to answer. really appreciate that! my domain url is keyword stuffed (homes for sale and the city name). does it make a difference if I foward that to my ning site, which is www.homesforsale(in city name).ning.com or is it just the same for SEO / pagerank value as paying ning for the proper url mapping. thanks so much!

    Read the article

  • Conditional blocks of code in linux bash

    - by Arek
    Nearly everybody knows very useful && and || operators, for example: rm myf && echo "File is removed successfully" || echo "File is not removed" I've got a question: how to put a block of commands after && or || operators without using the function? For example I want to do: rm myf && \ echo "File is removed successfully" \ echo "another command executed when rm was successful" || \ echo "File is not removed" \ echo "another command executed when rm was NOT successful" What is the proper syntax of that script?

    Read the article

  • object-oriented question

    - by user522962
    I am attempting to put all my database connections in 1 php file, rather than in each of my individual php pages. I have the following: //conn.php: <?php class conn { var $username = "name"; var $password = "password"; var $server = "localhost"; var $port = "3306"; var $databasename = "db"; var $tablename = "tablename"; var $connection; public function getConnected() { $this->connection = mysqli_connect( $this->server, $this->username, $this->password, $this->databasename, $this->port ); } } ?> // file.php: <?php require_once("conn.php"); class myClass{ public function con() { $conn = new conn(); $conn->getConnected(); } public function myF() { $stmt = mysqli_prepare($conn->connection, "SELECT * FROM $conn->tablename"); mysqli_stmt_execute($stmt); } } ?> I then call this as follows: $myNew = new myClass(); $myNew-con(); $myNew-myF(); When I call this, I get the following error: Undefined property: myClass::$connection What am I doing wrong?

    Read the article

  • ArrayIndexOutOfBoundsException trying to access data

    - by Eggy
    I am getting an array index out of bounds exception in the following code: for (int i=1; i<11; i++) { int a[][] = new int[10][3]; double LeftTrim = 1.0; double RightTrim = 1.0; a [i][0]=(int) (LeftTrim*((i)*25)); a [i][1]=(int) (RightTrim*((i)*25)); a [i][2]= 5000; //leftWheel, rightWheel, Milliseconds myf.setWheelVelocities(a[i][0], a[i][1], a[i][2]); JOptionPane.showMessageDialog(null, + (a [i][0] + a [i][1])/2 + "wheel velocities" + " | " + a [i][2] + " Milliseconds" + " Click OK to continue..."); } Every-time I reach the 9th increment Eclipse gives me the error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10" I have to test the velocity up to 250, but when I reach 225 and I click 'Ok' on 'Click ok to continue..." this error shows up! Am I going out of the array bounds or something? Thank you!

    Read the article

1