[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bluetooth-dev] SDP problem...



> -----Original Message-----
> From: david LIBAULT [mailto:david.libault@xxxxxxx.fr]
> Sent: 21 June 2001 15:02
> To: bluetooth-dev@xxxxxxx.com
> Cc: bluetooth-dev@xxxxxxx.com
> Subject: Re: [bluetooth-dev] SDP problem...
> 
> This is from sdp.c line 906
> 
> #ifdef USE_NEW_PROC
> ssize_t sdp_database_read(struct file *f, char *buf, 
> 			  size_t count, loff_t *offset)
> #else
> s32 sdp_database_read(struct inode *inode, struct file * file,
> 		      char * buf, s32 count)
> #endif
> {
> 	s32 len;
> 	
> 	D_PROC(__FUNCTION__ " Someone is trying to read %d bytes from sdp proc-file\n",
> 	       count);
> 	cli();
> 	if (database_query.count <= 0) {
> 		D_PROC(__FUNCTION__ " No bytes available, going to sleep\n");
> 		interruptible_sleep_on(&database_wq);
> 	}
> 	sti();
> 
> So when sdp_server tries to read the sdp_proc file, all 
> interrupts are disabled, and then it goes to sleep right?
> So, no more interrupts can happen. I don't understand
> this piece of code (I'm sorry).

interruptible_sleep_on() enables interrupts while it is waiting,
and disables them again before returning.

//Peter
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com