search for: cnt

Displaying 20 results from an estimated 665 matches for "cnt".

2007 Jan 08
3
Speeding things up
Hi, is it possible to do this operation faster? I am going over 35k data entries and this takes quite some time. for(cnt in 2:length(sdata$date)) { if(sdata$value[cnt] < sdata$value[cnt - 1]) { sdata$ddtd[cnt] <- sdata$ddtd[cnt - 1] + sdata$value[cnt - 1] - sdata$value[cnt] } else sdata$ddtd[cnt] <- 0 } return(sdata) Thank you, Benjamin
2009 Jan 12
5
[PATCH 0/5] OCFS2 quota fixes
Hello, the following series of patches fixes some issues with OCFS2 quotas. The first patch modifies VFS quota locking, the next patch uses the fact to simplify OCFS2 quota locking and solves a few deadlock issues. The third and the fourth patches fix another possible deadlocks in OCFS2 quota code and the last patch is a minor cleanup. Honza
2002 Sep 03
2
[patch] for rsync
...e ---------------------------------------------------------------------------------- 29a30,34 > struct pid_status { > pid_t pid; > int status; > } pid_stat_table[10]; > 37c42,47 < while (waitpid(pid, status, WNOHANG) == 0) { --- > pid_t waited_pid; > int cnt; > > while ( 1 ) { > waited_pid = waitpid(pid, status, WNOHANG); > if ( waited_pid == 0 ) { 39a50 > } else break; 40a52,63 > if (( waited_pid == -1 ) && ( errno == ECHILD )) { > /* status of requested child no longer available. Che...
2012 Mar 08
17
kernel BUG at fs/btrfs/delayed-inode.c:1466!
Hi, this shown up today. I had to do a hard reboot as graceful hanged on sync(). ------------[ cut here ]------------ kernel BUG at fs/btrfs/delayed-inode.c:1466! invalid opcode: 0000 [#1] SMP CPU 10 Modules linked in: btrfs zlib_deflate lzo_compress ipmi_devintf autofs4 be2iscsi iscsi_boot_sysfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_addr iscsi_tcp bnx2i cnic uio ipv6 cxgb3i libcxgbi
2009 Nov 15
2
resampling problem counting number of means above a specific value
...ns above 10 is coming out as zero, which I know isn't correct. I would appreciate it if someone could look at the code below and tell me what I am doing wrong. Many thanks, Graham > LL<- c(12.5,17,12,11.5,9.5,15.5,16,14) > N<-1000 > n<-length(LL) > threshold<-10 > cnt<-0 > for(i in 1:N){ + LLb <- sample (LL, n, replace=TRUE) + if (mean(LLb)<=threshold) cnt<-cnt+1 + } > cnt [1] 0
2010 May 26
1
[PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modified)
...10 deletions(-) diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 3f53b4d..f99db1b 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -305,6 +305,7 @@ static void VmbusChannelProcessOffer(void *context) int ret; int cnt; unsigned long flags; + static atomic_t ic_channel_initcnt = ATOMIC_INIT(0); DPRINT_ENTER(VMBUS); @@ -373,22 +374,24 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_...
2010 May 26
1
[PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modified)
...10 deletions(-) diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 3f53b4d..f99db1b 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -305,6 +305,7 @@ static void VmbusChannelProcessOffer(void *context) int ret; int cnt; unsigned long flags; + static atomic_t ic_channel_initcnt = ATOMIC_INIT(0); DPRINT_ENTER(VMBUS); @@ -373,22 +374,24 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_...
2010 May 19
1
[PATCH 1/2] staging: hv: Fix race condition in hv_utils module initialization.
...define MAX_MSG_TYPES 3 #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 7 static const struct hv_guid @@ -233,6 +232,11 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = { }; EXPORT_SYMBOL(hv_cb_utils); +/* Counter of IC channels initialized */ +atomic_t hv_utils_initcnt = ATOMIC_INIT(0); +EXPORT_SYMBOL(hv_utils_initcnt); + + /* * AllocVmbusChannel - Allocate and initialize a vmbus channel object */ @@ -373,22 +377,22 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt =...
2010 May 19
1
[PATCH 1/2] staging: hv: Fix race condition in hv_utils module initialization.
...define MAX_MSG_TYPES 3 #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 7 static const struct hv_guid @@ -233,6 +232,11 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = { }; EXPORT_SYMBOL(hv_cb_utils); +/* Counter of IC channels initialized */ +atomic_t hv_utils_initcnt = ATOMIC_INIT(0); +EXPORT_SYMBOL(hv_utils_initcnt); + + /* * AllocVmbusChannel - Allocate and initialize a vmbus channel object */ @@ -373,22 +377,22 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt =...
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- =...
2010 May 21
1
[PATCH 1/1] staging: hv: Fix race condition on IC channel initialization
...define MAX_MSG_TYPES 3 #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 7 static const struct hv_guid @@ -233,6 +232,10 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = { }; EXPORT_SYMBOL(hv_cb_utils); +/* Counter of IC channels initialized */ +atomic_t hv_utils_initcnt = ATOMIC_INIT(0); + + /* * AllocVmbusChannel - Allocate and initialize a vmbus channel object */ @@ -373,22 +376,22 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_TYPE...
2010 May 21
1
[PATCH 1/1] staging: hv: Fix race condition on IC channel initialization
...define MAX_MSG_TYPES 3 #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 7 static const struct hv_guid @@ -233,6 +232,10 @@ struct hyperv_service_callback hv_cb_utils[MAX_MSG_TYPES] = { }; EXPORT_SYMBOL(hv_cb_utils); +/* Counter of IC channels initialized */ +atomic_t hv_utils_initcnt = ATOMIC_INIT(0); + + /* * AllocVmbusChannel - Allocate and initialize a vmbus channel object */ @@ -373,22 +376,22 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_TYPE...
2019 Dec 06
2
Error in close.connection(p) : ignoring SIGPIPE signal
Not sure if this is a bug, so posting here first. If I run: ?? cnt <- 0L ?? while (TRUE) { ? ? ?? cnt <- cnt + 1L ? ? ?? p <- pipe("echo /dev/stdin > /dev/null", open = "w") ? ? ?? writeLines("foobar", p) ? ? ?? tryCatch(close(p), error = function(e) { print(cnt); stop(e)}) ?? } then once cnt gets to around 650, it...
2014 Feb 13
2
[PATCH net v2] vhost: fix ref cnt checking deadlock
vhost checked the counter within the refcnt before decrementing. It really wanted to know that it is the one that has the last reference, as a way to batch freeing resources a bit more efficiently. Note: we only let refcount go to 0 on device release. This works well but we now access the ref counter twice so there's a race: all users...
2014 Feb 13
2
[PATCH net v2] vhost: fix ref cnt checking deadlock
vhost checked the counter within the refcnt before decrementing. It really wanted to know that it is the one that has the last reference, as a way to batch freeing resources a bit more efficiently. Note: we only let refcount go to 0 on device release. This works well but we now access the ref counter twice so there's a race: all users...
2015 Feb 05
5
[LLVMdev] RFC: Recursive inlining
Hi Hal, > As we had briefly mentioned on IRC, one way of forming this 'stack', and its associated 'cnt' variable, is to use dynamic stack allocation. I hadn't really reached a decision on the mechanics yet. However, your suggestion while it can work within the current abilities of the IR, has the disadvantage that it is using an extra stack slot for the link pointer. I think if we are going...
2002 Jun 27
1
OpenSSH 3.3p1 on SunOS 4.1.4
...ompat/setenv.c.orig Wed Feb 13 06:00:16 2002 --- openbsd-compat/setenv.c Wed Jun 26 18:27:17 2002 *************** *** 40,45 **** --- 40,46 ---- #include <stdlib.h> #include <string.h> + #include <memory.h> /* * __findenv -- *************** *** 123,129 **** (cnt + 2))); if (!P) return (-1); ! memmove(P, environ, cnt * sizeof(char *)); environ = P; } environ[cnt + 1] = NULL; --- 124,130 ---- (cnt + 2))); if (!P) return (-1); ! memcpy(P, environ, cnt * sizeof(char *)); environ = P; } environ[cnt...
2003 Dec 30
1
Accuracy: Correct sums in rowSums(), colSums() (PR#6196)
...sed improvement has been tested in !IEEE_754 mode, the patch is attached. It is intended to be applied against R-1.7.1/src/main/array.c --------- Cut here ---------- *** array.c.old Mon Dec 15 17:33:23 2003 --- array.c Mon Dec 15 17:33:45 2003 *************** *** 1016,1022 **** int OP, n, p, cnt = 0, i, j, type; Rboolean NaRm, keepNA; int *ix; ! double *rx, sum = 0.0; checkArity(op, args); x = CAR(args); args = CDR(args); --- 1016,1022 ---- int OP, n, p, cnt = 0, i, j, type; Rboolean NaRm, keepNA; int *ix; ! double *rx, sum = 0.0, correc...
2010 May 28
0
[PATCH 1/1] staging: hv: Fix race condition on vmbus channel initialization
....channel_lock, flags); +} + + /* * VmbusChannelProcessOffer - Process the offer by creating a channel/device * associated with this offer @@ -373,22 +393,21 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_TYPES) { + /* Open IC channels */ + for (cnt = 0; cnt < MAX_MSG_TYPES; cnt++) { if (memcmp(&newChannel->OfferMsg.Offer.InterfaceType, &hv_cb_utils[cnt].data, - sizeof(struct hv_guid)) == 0) { + sizeof(struct hv_guid)) == 0 &amp...
2010 May 28
0
[PATCH 1/1] staging: hv: Fix race condition on vmbus channel initialization
....channel_lock, flags); +} + + /* * VmbusChannelProcessOffer - Process the offer by creating a channel/device * associated with this offer @@ -373,22 +393,21 @@ static void VmbusChannelProcessOffer(void *context) * can cleanup properly */ newChannel->State = CHANNEL_OPEN_STATE; - cnt = 0; - while (cnt != MAX_MSG_TYPES) { + /* Open IC channels */ + for (cnt = 0; cnt < MAX_MSG_TYPES; cnt++) { if (memcmp(&newChannel->OfferMsg.Offer.InterfaceType, &hv_cb_utils[cnt].data, - sizeof(struct hv_guid)) == 0) { + sizeof(struct hv_guid)) == 0 &amp...